Release 0.9.6#

2023-07-22

This release was mostly about C++ code refactoring

  • Removing direct dependency on Abseil’s flags library.

    • This was always considered auxiliary and therefore didn’t get proper attention. What is bad is that flags are static variables. Testing becomes difficult (global variable have to be set) and code using flags generally becomes very hard to maintain. Effectively, examples and templates promoted bad practices…

    • The solution was to open source scripts to auto-generate the code for Abseil flags and then force access using non-static methods. Downside: existing client code now has to pass “flags” (often called “settings” in new code) around at construction time.

  • General code clean-up.

The CME gateway now has preliminary support for iLink’s SBE (binary) protocol.

Finally, please note that Bybit (supporting the v5 protocol) replaces previous gateways for spot and futures.

API Changes#

Ready#

A new Ready event has been added to the client API to indicate the end of the initial download phase.

Client + Logging + Flags#

The use of Abseil flags has been moved to separate libraries.

This was done to make it possible to instantiate certain objects by explicitly passing a Settings object with the relevant flags.

For example, it is now possible to link to both roq-client and roq-adapter from the same binary as long as the Settings’s are populated externally from the libraries themselves.

Changes…

CMakeLists.txt (top-level)

find_package(roq-flags REQUIRED)

CMakeLists.txt (source)

target_link_libraries(
  ${TARGET_NAME}
  PRIVATE ${TARGET_NAME}-flags
          roq-client::roq-client
          roq-client::roq-client-flags    # new
          roq-logging::roq-logging
          roq-logging::roq-logging-flags  # new
          roq-flags::roq-flags            # new
          roq-api::roq-api)

main.cpp

int main(int argc, char **argv) {
  roq::flags::Args args{argc, argv, INFO.description, INFO.build_version};
  roq::logging::flags::Settings settings{args};
  return simple::Application{args, settings, INFO}.run();
}

Application.hpp

int main(roq::args::Parser const &) override;

Application.cpp

int Application::main(roq::args::Parser const &args) {
  auto params = args.params();
  if (std::empty(params))
    roq::log::fatal("Unexpected"sv);
  Settings settings{args};
  Config config{settings};
  // ...
  return EXIT_SUCCESS;
}

You can browse GitHub to see how the required changes have been implemented

Note

Flags are now auto-generated using the roq-scripts project. However, you do not need to use this. It is perfectly fine to use Abseil directly.

Gateways#

CME#

Now with iLink support.

Bybit#

Renamed to roq-bybit from roq-bybit-v5.

CHANGELOG#

Milestone on GitHub.

Added#

  • cache::MarketByPrice::impact_price() (API) (#372).

  • iLink support (order management) (CME) (#368).

Changed#

  • Rename package (Bybit) (#373).

  • Use Settings (Many) (#356).

Fixed#

  • Creating regex failed on macOS (FIX Bridge) (#371).

  • Segmentation fault when --service_listen_address was missing (Server) (#370).

Other#