Broker Message Types¶
This reference documents the normalized live message types that flow through the broker adapters, event bus, and live engine.
Live Topics¶
LiveTopic values (from live/event_bus.h):
MarketDataExecutionReportPositionUpdateAccountUpdateSystem
MarketDataUpdate¶
Defined in live/types.h:
data: variant ofBar,Tick,Quote, orOrderBook.timestamp()extracts the event timestamp from the payload.symbol()extracts the symbol ID from the payload.
classDiagram
class MarketDataUpdate {
+variant data (Bar | Tick | Quote | OrderBook)
+timestamp() Timestamp
+symbol() SymbolId
}
ExecutionReport¶
Defined in live/broker_adapter.h:
broker_order_idbroker-native order identifier.broker_exec_idbroker-native execution identifier.symbolstring symbol.sidebuy/sell.quantityfill quantity.pricefill price.commissioncommission paid.statuslive order status.textbroker status/diagnostic message.timestampevent timestamp.
classDiagram
class ExecutionReport {
+string broker_order_id
+string broker_exec_id
+string symbol
+OrderSide side
+double quantity
+double price
+double commission
+LiveOrderStatus status
+string text
+Timestamp timestamp
}
LiveOrderStatus¶
Live order statuses are normalized in live/broker_adapter.h:
PendingNewNewPartiallyFilledFilledPendingCancelCancelledRejectedExpiredError
Position¶
Defined in live/types.h:
symbolstring.quantitydouble.average_pricedouble.market_valuedouble.
AccountInfo¶
Defined in live/types.h:
equitydouble.cashdouble.buying_powerdouble.
LiveMessage Wrapper¶
All broker events flow through LiveMessage (in live/event_bus.h):
classDiagram
class LiveMessage {
+LiveTopic topic
+variant payload (MarketDataUpdate | ExecutionReport | Position | AccountInfo | string)
+string origin
}
Delivery Flow¶
- Broker adapter parses raw broker messages into
MarketDataUpdateandExecutionReport. LiveTradingEngineenqueues and dispatches updates.EventBusroutes events to subscribers byLiveTopic.