roq-cme#
Links#
Purpose#
Maintain network connectivity with the CME exchange
Route exchange updates to connected clients
Route client requests to the relevant exchange accounts
Stream all messages to an event-log
Overview#
Spot |
|
Futures |
✓ |
Options |
Reference Data |
✓ |
Market Status |
✓ |
Top of Book |
✓ |
Market by Price (L2) |
✓ |
Market by Order (L3) |
✓ |
Trade Summary |
✓ |
Statistics |
✓ |
Create |
✓ |
Modify |
✓ |
Cancel |
✓ |
Cancel All |
✓ |
Auto Cancellation |
Positions |
|
Funds |
Data center located in: Chicago, US
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-cme
$ cp $CONDA_PREFIX/share/roq-cme/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-cme \
--name "cme" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-cme --help
--exchange
(std::vector<std::string>(XCBT,XNYM)
)Exchange identifier (list)
--enable_market_by_order
(false
)Enable market by order updates?
--filter_snapshot_from_incremental
(1024
)Used to remove low sequence number messages, e.g. snapshots
--secdef_config_file
Config file (path)
--mbp_allow_price_inversion
(false
)Allow price inversion?
--decode_buffer_size
(10485760
)Decode buffer size
--encode_buffer_size
(4096
)Encode buffer size
--ilink_firm_id
Firm Id
--ilink_port
Port
--ilink_location
Location
--ilink_config_file
Config file (path)
--ilink_market_segment_ids
Comma-separated list of market segments, e.g. 70
--multicast_config_file
Config file (path)
--multicast_channel_ids
Comma-separated list of multicast channels, e.g. 310
--multicast_local_interface
Multicast local interface
--multicast_buffer_size
(2048
)Buffer size (at least the maximum possible size of a datagram)
--multicast_buffer_depth
(8
)Multicast buffer depth (used for re-ordering)
--multicast_timeout
(90s
)Timeout when waiting for snapshot
--test_mbp_to_mbo_clear_price_level
(false
)Use MbP to delete MbO price levels?
--test_reordering
(0
)Test
--test_drop
(0
)Test
Environments#
$ $CONDA_PREFIX/share/roq-cme/flags
There is no specific environment setup.
You need to download the MDP config.xml
and iLink MSGW_Config.xml
files.
These files are used to discover IP addresses for MDP multicast and iLink’s MSGW (market segment gateways).
The gateway flags --multicast_channel_ids
and --ilink_market_segment_ids
are used to
join multicast streams and connect to specific MSGW end-points.
The multicast addresses must be made available from a local network interface.
The actual IP address of that interface must be provided with the --multicast_local_interface
flag.
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Incremental |
MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63 |
||
Incremental |
SecurityStatus30, MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63 |
||
Incremental |
MDIncrementalRefreshBook46 |
||
Incremental |
MDIncrementalRefreshBook46 |
||
Incremental |
MDIncrementalRefreshBook46, MDIncrementalRefreshOrderBook47 |
||
Incremental |
MDIncrementalRefreshTradeSummary48, MDIncrementalRefreshTradeSummaryLongQty65 |
||
Incremental |
MDIncrementalRefreshDailyStatistics49, MDIncrementalRefreshSessionStatistics51, MDIncrementalRefreshSessionStatisticsLongQty67, MDIncrementalRefreshVolume37 |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Instrument Definition |
MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63 |
||
Instrument Definition |
MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55 |
||
MBP Market Recovery |
SnapshotFullRefresh52, SnapshotFullRefreshLongQty69 |
||
MBO Market Recovery |
SnapshotFullRefreshOrderBook53 |
||
Statistics#
TBD
Order Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReportTradeOutright525, ExecutionReportTradeSpread526, ExecutionReportTradeSpreadLeg527 |
||
OrderEntry |
ExecutionReportTradeOutright525, ExecutionReportTradeSpread526, ExecutionReportTradeSpreadLeg527 |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReportStatus532 |
||
Unavailable |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
NewOrderSingle514 |
||
OrderEntry |
OrderCancelReplaceRequest515 |
||
OrderEntry |
OrderCancelRequest516 |
||
OrderEntry |
OrderMassActionRequest529 |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderUpdate |
ExecutionReportNew522, ExecutionReportReject523, ExecutionReportModify531, ExecutionReportCancel534, BusinessReject521 |
Order Types#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
Time in Force#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
|
Mapped to |
|
Mapped to |
Position Effect#
Note
Not supported
Execution Instructions#
Note
Not supported
Templates#
Note
Not supported
Account Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
Unavailable |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
Unavailable |
Streams#
Type |
Comments |
---|---|
UDP |
Primary purpose
|
Type |
Comments |
---|---|
UDP |
Primary purpose
|
Type |
Comments |
---|---|
UDP |
Primary purpose
|
Type |
Comments |
---|---|
UDP |
Primary purpose
|
Type |
Comments |
---|---|
TCP |
Primary purpose
|
Constraints#
The OrderEntry (iLink) connections are established based on the provided list of market segments. This is a bit unusual: the list of accounts are normally 1:1 with the connections. It is only allowed to configure a single account until we know better how this all works with CME’s party-definitions.
The actual exchange (e.g. XCBT) is now used for order management. The reason is technical and due to most gateways only providing access to a single exchange. The exchange name used for creating, modify and canceling orders, must therefore match the name provided with the
--exchange
flag.
Tools#
roq-cme-import#
roq-cme-pcap-import \
--type pcap \
--config_file config.xml \
--channel_ids 344 \
--name cme \
--symbols "^ZN[FGHJKMNQUVXZ][0-9]$" \
--output_file test.roq \
test.pcap
This will use config.xml
(from CME) and the channel_ids
to filter
the test.pcap
file.
The test.roq
evnet-log will use gateway name cme
and include the
symbols matching the regex.
roq-cme-filter#
roq-cme-pcap-filter \
--type tcpdump \
--config_file config.xml \
--channel_ids 344
(host 224.0.31.110 and port 14344) or (host 224.0.32.110 and port 15344) or (host 224.0.31.68 and port 14344) or (host 224.0.32.68 and port 15344) or (host 224.0.31.89 and port 14344) or (host 224.0.32.89 and port 15344) or (host 233.72.75.33 and port 23344) or (host 233.72.75.96 and port 22344)(dev)
This will output a tcpdump
filter for channel_ids
.
Comments#
ExternalLatency
is currently only published when receiving a heartbeat from the exchange.MarketByOrder
is opt-in using the--enable_market_by_order
flag.ExecutionReportTradeOutright
reportsLastPx
as the order’s limit price. This should normally be expected to be the (average) price of the fill(s).