Note
THIS IS PRE-RELEASE DOCUMENTATION
This release has bug fixes and improvements.
The API has been cleaned up to better align with the C++17 standard library, e.g. by removing custom literals (previously required for compatibility with various libraries). Utility classes for object caching have also been promoted to the API thereby reducing the effort needed to maintain data-structures when implementing strategies.
Client requests have been driving the implementation of the following gateways
These gateways are now ready for early adopters.
In the following you will find high-level descriptions of important changes.
Positions
The semantics has changed for
PositionUpdate
(GitHub).
Previous implementation had two seperate updates for long and short.
This has now been merged into a single update with separate fields being prefixed with either
long_
or short_
.
Snapshot
The semantics has changed for
TopOfBook
(GitHub).MarketByPriceUpdate
(GitHub).MarketByOrderUpdate
(GitHub).StatisticsUpdate
(GitHub).
Previous implementation had a boolean flag snapshot
.
This has now been replaced with an enumeration UpdateType
(GitHub)
identifying the update as one of snapshot, incremental, and stale.
A utility function has been added to support transition: roq::utils::is_snapshot(update_type)
(GitHub).
Reference Data
Some fields have been renamed to align with FX conventions
base_currency
(fromsettlement_currency
)quote_currency
(fromcurrency
)
New fields have been introduced
max_trade_vol
trade_vol_step_size
Caching
Utility classes have been moved to the API and can be found here.
Most implementations are open-source and the implementation logic is header-only due to the API not being a library.
Those that are not open-source will have factory methods exposed by the client library.
C++ Literals
Code changes should be expected if custom literals have been used.
This is essentially a left-over from before C++17 being required as well as a work-around
to deal with pre-compiled format strings made possible by fmt
(before version 8).
Replace
_sv
withsv
_s
withs
using namespace roq::literals;
withusing namespace std::literals;
CHANGELOG
Added
- Utility classes useful for processing and caching update events (API) (#111).
- Support
RequestForPosition
,RequestForPositionAck
andPositionReport
(FIX Bridge) (#92). - Add exchange sequence number to
MarketByPrice
andMarketByOrder
(API) (#101). - Add
max_trade_vol
andtrade_vol_step_size
toReferenceData
(API) (#100). - New gateway: KuCoin (#50).
Changed
- Remove external rate-limiter mirroring from the REST connection (Core) (#83).
- Remove custom literals (API) (#110).
- Default order-management to using FIX (FTX) (#107).
- Change default web-socket end-point (BitMEX) (#106).
- Round quantity and price for
CreateOrder
/ModifyOrder
(Deribit) (#102). ReferenceData
currencies should follow FX conventions (API) (#99).- Use base currency for
ExecutionReport
(FIX Bridge) (#98). - Replace "snapshot" (
bool
) with "update_type" (UpdateType
) (API) (#97). - Drop account configuration requirement / allow "market data"-only operation. (#96).
- Some warnings should only be logged once (#94).
- Align metrics and loop flags with roq-server (Client) (#76).
- More
MAX_LENGTH
constants added to help reduce allocations (API) (#91). - Align
PositionUpdate
with the FIX protocol (API) (#89). - Add
StatisticsType::TRADE_VOLUME
(API) (#88). - Report last traded as aggregate of all fills (Deribit) (#84).
- Position updates are now real-time (Deribit) (#79).
Fixed
PositionUpdate
andFundsUpdate
were not dispatched (FTX) (#108).- Reset last-traded quantity/price to avoid double counting (#105).
- Some
CreateOrder
fields were not validated (#104). - Not all update paths populated the
currency
field ofExecutionReport
(FIX Bridge) (#103). - Order limit price must be rounded to quote_increment (Coinbase-PRO) (#46).
- Enrich
OrderUpdate
for completed orders without fill information (Kraken Futures) (#90). - Resubscription wasn't implemented (Deribit) (#86).
- Utility functions did not handle
RequestStatus::FAILED
correctly (API) (#82). - Order-book validation failed due to rounding problems for extreme prices vs tick_size (FTX) (#81).
- Resubscription wasn't implemented (BitMEX) (#80).
- Request matching heuristics did not support rejected requests using price/quantity (OMS) (#78).
- Advance
max_response_version
for rate-limiter rejected requests (OMS) (#77).
Work in Progress
The following gateways can be downloaded and tested, but are in no meaningful way ready for production. Any ongoing work is completey driven by client requests.
Please reach out if you have specific requirements.
Note
Many of the exchanges listed here offer no test environment making it difficult to implement the order management logic. You can support the development by lending us production credentials to implement and test various order scenarios. Some small funding will be required.
Huobi
roq-huobi
- Market data is completely missing.
- Order management is completely missing.
Huobi Futures
roq-huobi-futures
- Market data is completely missing.
- Order management is completely missing.
KuCoin Futures
roq-kucoin-futures
- Currently not possible to test anything using the sandbox environment (confirmed by support).
- Order requests have been prepared, but not yet tested.
- Order ack and update is completely missing.