All notable changes will be documented in this file.
- Support leverage (CreateOrder, OrderAck, OrderUpdate) (#529)
- Workaround for fmt 11.2 and clang 21.x (#521)
- Increase max-length of
symbolto 64 (#516) - Auto-generate time-series from history of event-logs and live data (#515)
- Better support for estimating P&L and funds (#514)
- Extend FundsUpdate with borrowed amount (#502)
- Upgrade the
format_strhelper class to work withfmt 11.1(#488)
- Control enabled/disabled state (#484)
- Support MassQuote (#483)
- Add quantity type to order management (#469)
- Add settlement currency to reference data (#468)
cache::MarketByPrice::impact_priceto accept an optional number of orders (#462)Fillto support quote quantity and commission (#458)
- Issues with create limited depth updates (#453)
utils::compare<double>could incorrectly compare values in the [0;1] range (#446)
RateLimitsUpdateto support exchange rate-limit updates
- Renamed
{price|quantity}_precision(from{price_quantity}_decimals - Moved several header files to the roq-server library (from the roq::oms namespace here)
- UUID now using C++23 features
- Moved several header files to the roq-cache library (from the roq::cache namespace here)
- Moved several header files to the roq-utils library (from the roq::utils namespace here)
- Promote Decimal to API (from utils::Number) and rename Precision (from Decimals) (#439)
- Adding exchange time, exchange sequence and sending time to ReferenceData and MarketStatus
- Adding
PositionEffecttoOrderAck - Adding
MarginModetoCreateOrder,OrderAck,OrderUpdate,TradeUpdate - OMS validate quantity and price against reference data (#432)
- Added
MarginModetoFundsUpdateandPositionUpdate(#430)
- The position cache would treat zero as a missing value and therefore not update (#419)
exchange_sequenceis nowuint64_t(wasint64_t)RoutingIdnow 64 bytesGatewaySettings.oms_cancel_all_ordershas been added (#414)CancelAllOrdersnow includes some filters (#414)oms::OrderUpdatenow includes the max request/response/accepted versions
Fill.exchange_time_utcCancelAllOrdersAck(#414)- EXPERIMENTAL: messages for managing dynamic routes
- The FlatBuffers schema and auto-generated is no longer needed (replaced by the roq-codec library)
oms::OrderUpdate::routing_idto support FIX
order_idmust beuint64_t(#377)
OrderAck.client_order_idandTradeUpdate.client_order_id(#389)CancelAllOrders.strategy_idCreateOrder.strategy_id,OrderAck.strategy_id,OrderUpdate.strategy_id,TradeUpdate.strategy_id(#375)OrderAck.userto support drop-copy and risk management
- Using
std::source_location(clang16) - Using fmt10
Error.RISK_LIMIT_REACHED- New
Readyevent to indicate the completion of the intial download phase - Risk exposure and change added to
OrderAckandOrderUpdate(EXPERIMENTAL) cache::MarketByPrice::impact_price()(#372)RiskLimitsandRiskLimitsUpdate(EXPERIMENTAL)client::Dispatcher.broadcast(CancelAllOrders)
- The
Mask<E>template had to be changed to work with magic_enum 0.9.0
OrderUpdate.client_order_id(#366)OrderAck.traded_quantity(#359)
oms::TradeUpdatewas unnecessary (TradeUpdateis sufficient for the gateways)
- Review
PositionUpdateandFundsUpdateto better correlate withOrderUpdateandTradeUpdate(#340) cache::MarketByOrder::OrderUpdatenow includes the final update actionStreamStatusshould include connection details (#337)- [BREAKING CHANGE]
CreateOrder::request_template(renamed fromorder_template) - All order requests must support
request_template(#329)
- Drop
OrderUpdate.order_template(#330)
CustomMatrix(#344)PortfolioUpdateandPositionto support a position manager (#343)
sending_time_utcto market data messages (#326)oms::TradeUpdate(#254)client::Settings.drop_copy(#254)
- [BREAKING CHANGE]
MarketByOrderUpdateandMBOUpdatehas been changed to support CME's TradeSummary (#322)
- utils::invert(side)
didn't work forside == UNDEFINED` (#325)
MBOUpdate.reason+UpdateReasoncache::MarketByOrder
fbs::MarketByOrderUpdate.max_depthwas inserted (should not be an issue since it was never used before)MBOUpdate:prioritynowuint64_t,order_idlength 36 (UUID), re-ordering
- New
ProtocolandEncodingto support Roq's UDP transport (#307)
- Move
Category(from the core and adapter libraries) (#297)
Parameternow includes theaccount,exchange,symboltupleParametersUpdatewas renamed (fromParameterUpdate)TraceInfonow default initializing to current timeclockpromoted (from core library)
RequestStatus.ERROR(#292)TradeSummaryto include exchange sequence and taker/maker order id's (#279)CustomMetrics.update_typeandCustomMetricsUpdate.update_typeGatewaySettings.mbp_checksum
- Preparing to drop C++17 compatibility
cache::MarketByPrice::max_depthnow returnsuint16_t
MarketByPriceUpdate.checksumfrom the FlatBuffers schema- Optimize the
cache::MarketByPriceinterface (#267)
client::EventLogMultiplexer(#266)- Cache objects for Create/Modify/CancelOrder (#26)
ParameterUpdate(#258)
- Optimize the
cache::MarketByPriceinterface (#267) - An optional
is_lastfield has been added toclient::Dispatcher::send(#26) - Move
RateLimiter(from roq-server) (#259) - API changes needed to support drop-copy (#254)
- Add notional fields to
ReferenceData(#252) - Add new fields to
RateLimitTrigger(#251)
OrderUpdateAction(replaced withUpdateAction)
utils::safe_castnow usingstd::numeric_limist::lowest()(instead ofmin())
- fmt v9 requires custom formatters to be const
- Prevent copy/move of
Event<>andTrace<>(#247) - return
span<MBPUpdate>fromcache::MarketByPrice(#241) - Flatbuffers auto-generated code now using C++17
client::EventLogReadernow expose more metadataMBPUpdatenow supportsUpdateAction(#236)
cache::Manager::get_market_with_idandcache::Manager::get_market_idReferenceData::discard(#225)
- Promote
utils::DateTime_iso8601formatter to API (from core) - Make
cache::Managera non-template (#230) cache::MarketByPrice::stream_id()
cache::MarketByPrice::find_indexcache::MarketByPrice::compute_vwap- RequestIdType added to GatewaySettings (from server)
- Increase
Symbolfixed-length size to 48 (#214) Event<>andTrace<>formatting has move the value to the front- C++17 compatibility (std::span and "using enum" workarounds)
Tracenow supports non-const (and retains const-safety when const)TopOfBooknow includes an exhange sequence number (to correlate with MbP updates)StreamStatusnow provides more detailed information- Promote
debug::hex::Messageanddebug::fix::Message(from core library) - Comparisons now use (or return)
std::strong_ordering(instead ofint) - Simplify enums (#199)
- Proper bit-mask support (#198)
- Promote Trace and TraceInfo to API (from server)
- Enforce fixed-length strings for standard use-cases (account, exchange, symbol, ...)
- Rename
string(fromstring_buffer) - Promote Mask to API (from utils)
- Rename headers to .hpp (#195)
- Conda packaging should pin versions to match x.x.x (#189)
- Added
update_typetoOrderUpdateandTradeUpdate(#39)
- Added account to ExternalLatency (#170)
- Source file name are now evaluated and stored at compile time (#160)
- Upgrade to C++20 (#158)
cache::MarketByPrice::exists(#153)SecurityType::SWAP- Capture
origin_create_timefor externally triggered events (#140)
- Increase
MAX_LENGTH_CURRENCY ReferenceData::margin_currency(#150)- Support macOS/ARM64 (#149)
client::DepthBuilder(#152)
- Align oms with new use of Decimals enum
MarketByPriceUpdatenow include max-depth (#123)MarketByPriceUpdateandMarketByOrderUpdatenow include checksum (#74)MarketByPriceUpdateandMarketByOrderUpdatenow include price/quantity decimals (#119)
- Capture request round-trip latency (#130)
- Starting to move object cache logic into API (#128)
- Move cache utilities to API (#111)
- Promoted
server::TraceInfoto API - Add exchange sequence number to
MarketByPriceandMarketByOrder(#101) - Add
max_trade_volandtrade_vol_step_sizeto ReferenceData (#100) - New method to update
market::MarketByPrice(#17) - Price/quantity decimal digits added to
oms::Order(#46) - Conversion to/from internal price used by
market::MarketByPrice(#21) - Interface to extract bid/ask
MBPUpdatefrommarket::MarketByPrice - New
UpdateType(will eventually be used withMarketByPriceUpdate) (#93) - Add
StatisticsType::TRADE_VOLUME(#88)
- Remove custom literals (#110)
- ReferenceData currencies should follow FX conventions (#99)
- Replace
snapshot(bool) withupdate_type(UpdateType) (#97) - Align type used to represent decimal digits (#46)
- Adding more
MAX_LENGTHconstants (#91) - Align
PositionUpdatewith the FIX protocol (#89)
- Utility functions did not correctly handle
RequestStatus::FAILED(#82)
- New
market::MarketByPriceinterface (#56)
RequestStatus::TIMEOUTshould not be a final order request state (#59)GatewaySettingshas changed structure and new fields (#56)client::DepthBuildernow derives frommarket::MarketByPrice(#56)string_bufferdid not have O(1)length()(#53)- Move OMS interfaces to API (#51)
RateLimitTriggermust support const members (#34)
- API exceptions should compile with C++14 (#69)
Error::INSUFFICIENT_FUNDS(#32)RateLimitTriggerreplacesRateLimitUsage(#34)- Promoting
RateLimitTypeto API (#34) NotSupportedexception (clean-up)CustomMetrics(publish) andCustomMetricsUpdate(receive) (#8)NotImplementedexception (clean-up)Error::CONDITIONAL_REQUEST_HAS_FAILEDandError::UNKNOWN_ORDER_ID(#25)utils::was_order_receivedandutils::to_request_status(#25)OrderAck::side(#11)client::EventLogReaderinterface (#10)
- The various interfaces used for simulation has been updated (#7)
Subscribehas been removed from API (#14)
Errorhas been extended to communicate certain exchange errorsRequestStatusnow includesDISCONNECTED,TIMEOUT, andFAILEDOrderAcknow includesexchangeandsymbolCustomMessagenow usesspanto represent the message
DepthBuilderwas unsafe because the constructor cached a pointer to a span ofLayers, aka. the depth. This has been changed and applying aMarketByPriceUpdatewill now require you to also pass a reference to the depth.
Error::REQUEST_RATE_LIMIT_REACHEDStatisticsType::FUNDING_RATE_PREDICTION
- Dropped all wrappers for fmt. (Reason:
fmt::format_stringis now a template solution -- previously it was a macro).
- The exception hierarchy no longer tries to mirror
std.
OrderManagementused to instruct a gateway of the order management styleMAX_ORDER_IDandMAX_REQUEST_VERSIONto reflect 24 bit limits
OrderAck,OrderUpdate,ModifyOrderandCancelOrdernow useuint32_tfor all version fields- The format functions no longer require use of the
_fmtliteral - Reduced
MAX_LENGTH_ROUTING_IDto 16 GatewaySettingsnow includesoms_download_has_stateandoms_download_has_routing_id
- The
_fmtliteral - The
format_strwrapper class has been moved to the roq-logging library
Errorhas been updatedOrderAckhas been updated and extended withversionOrderUpdatehas been updated and extended withmax_request_version,max_response_versionandmax_accepted_versionModifyOrderandCancelOrderhas been updated withversionandconditional_on_versionCreateOrderandOrderUpdatehas changed field ordering to better group constant vs. possibly changing fieldsTradeUpdateandFillhas changed field ordering andFillhas dropped artificially generatedtrade_id'sMBPUpdatehas been updated withimplied_quantity,price_levelandnumber_of_orders
RateLimitUsageto allow strategy to back off when it high-water mark on rate-limiting has been detectedCancelAllOrderswhen all orders must be cancelled immediatelyGatewaySettings.mbp_allow_remove_non_existingto indicate if an exchange could possibly send updates to unknown price levelsStatisticsType::FUNDING_RATEandStatisticsType::DAILY_FUNDING_RATErouting_idtoModifyOrderandCancelOrderSupportType.ORDER_STATEto indicate if gateway supports FIX 4.4 style order state management (through ClOrdId/OrigClOrdId transitions)GatewaySettings.supportsto allow users to detect what is supported- Added
Liquidityto indicate if last fill was as maker or taker - Extend
OrderUpdatewith more fields (required for FIX bridge and download) TradingStatushas been completely reviewed to match the trading session state changes which can occur on most exchangesExecutionInstructionwill now support bit-masks (future change)- The layout of many structs have changed
client::Config::Handlernow includes a method to configurclient::Settings. This makes it possible to overridecancel_policy(on disconnect)Disconnectednow adds a flag useful to detect if disconnect could trigger an order cancellation requestOrderStatusbetter aligned with FIX enum, but excluding state transitionsTimeInForcebetter aligned with FIX enum
- Promoted a number of generic utilities to the
roq::utilsnamespace. Although these are useful, they should not be considered "API". - The
routing_idfield has been added to the relevant order management structures.
- All server (gateway) originated structs now include
stream_idto indicate the origin of a message.MarketDataStatusandOrderManagerStatushave been replaced withStreamUpdate. Clients must use thesupportsbit-mask fromStreamUpdateto maintain availability of cached objects. This change was done to allow gateways to manage load balance e.g. by maintaining multiple connections. - Replaced
ConnectionwithConnectedandDisconnected - Renamed
GatewayStatustoConnectionStatus
- Python API (this is not the right place)
- Removed
namefromExternalLatency - Removed
MarketDataStatusandOrderManagerStatus
- Convenience functions making it easy to encode Flatbuffers objects
- Consistent use string literals
- Enforce usage of the
_fmtliteral when formatting
- Enumerations no longer include
MAX
-
Repo now includes the auto-generated header files (for better discoverability)
-
Miniforge (instead of Miniconda)
-
MessageInfo.source_session_idnow using a more efficient UUID representation -
Now using span-lite (instead of own implementation, C++20 preparation)
SettingsExternalLatency
UserandAccountremoved (not public interfaces)
-
Time management has been changed
std::chrono::nanosecondsused for all precision timestampsstd::chrono::secondsused for all date-timesstd::chrono::days(usingroq::chrono::daysuntil C++20 is supported) used for all dates
-
ReferenceDatadescription,underlying,time_zone,issue_date,settlement_date,expiry_datetime, `expiry_datetime_utc
-
ReferenceData::limit_{up|down}- Upper and lower trading limits belongs to daily session statistics,
not reference data.
These fields were anyway already managed by
StatisticsUpdate.
- Upper and lower trading limits belongs to daily session statistics,
not reference data.
These fields were anyway already managed by
client::Collectorinterface now implements default handlers instead of having pure virtual functions.is_{order|request}_completedreplacingis_completed.
client::Collector::{extract|write}were too specific.
- Automake support
Note! CMake is now the default build system for all Roq solutions. This makes it significantly easier to integrate with other CMake based solutions.
- CMake is now the default build system for all Roq solutions
- Replace ROQ_PREDICT_{TRUE,FALSE} with ROQ_LIKELY and ROQ_UNLIKLEY to better match c++20 naming
- Removed (again) the use of FMT_STRING since it will not be compatible with c++20
roq/format.h
Note! FlatBuffers has been introduced to compliment the C++ interface for non-latency sensitive use-cases. Event-logs are now using FlatBuffers for all encoding. This allows for backwards compatibility and thereby dropping the requirement for decoding to be binary compatible with encoding. An upcoming release will introduce a FlatBuffers interface into the gateways thereby allowing other languages than C++ languages to communicate with the gateway.
- FlatBuffers schema (experimental!)
StatisticsUpdate(to replaceDailyStatisticsandSessionStatistics)
- Events are now wrapped with the
Eventtemplate - Replaced
MarketByPriceandMarketByOrderwithMarketByPriceUpdateandMarketByOrderUpdateto more clearly reflect changes being communicated
roq::event_value<ConnectionStatusEvent>was broken in release 0.3.8
- Metrics interfaces and utilities have been moved into the
roq::metricsnamespace - Metric collectors now using std::atomic variables
- Logging has been moved into a separate library
roq-logging
- Auto-generate enums, structs, classes, formatting, etc.
- Major parts of the client API have been moved here
- Dependency on FlatBuffers
SessionsStatistics::index_valueandSessionsStatistics::margin_rate
- Inherit all network-related exceptions from
NetworkError
TimedOut(exception)
ExecutionInstruction(enum) similar to FIXExecInstError::EXECUTION_INSTRUCTION_NOT_SUPPORTEDAccount::userOrderUpdate::execution_instruction,OrderUpdate::stop_priceandOrderUpdate::max_show_quantity- Ensure all enums have an
UNDEFINED
OrderUpdate::commissions
- Log non-zero application exit codes as warning
- Prefer C++ raw strings
Fill(struct)TopOfBook(struct)price_from_side(function)span(struct)
MBOUpdate::side
TradeUpdate(struct) now containing an array ofFill's (struct)- Logging now requires
FMT_STRINGto better formatting errors at compile time MarketByPrice(struct) now maintainingbidsandasksseparatelyMBOUpdate::order_id(string) replacesorder_id_ext(integer)- Use
roq::spaneverywhere