roq-cme#

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#

Products

Spot

Futures

Options

Market Data

Reference Data

Market Status

Top of Book

Market by Price (L2)

Market by Order (L3)

Trade Summary

Statistics

Order Management

Create

Modify

Cancel

Cancel All

Auto Cancellation

Account Management

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

--multicast_config_file

An config.xml file from the CME FTP download area.

--multicast_channel_ids

A list of channel id’s to subscribe to (as defined from the config.xml file)

--multicast_local_interface

The local interface used to bridge the multicast feed.

--multicast_buffer_size

Buffer size required by each datagaram in the re-ordering buffer.

--multicast_buffer_depth

The maximum number of datagrams that can be held in the re-ordering buffer.

--ilink_firm_id

The CME assigned firm ID

--ilink_port

The CME assigned port (for the firm ID)

--ilink_location

AN ISO code for the location, e.g. “UK”

--ilink_config_file

A MSGW_Config.xml file from the CME FTP download area.

--ilink_market_segment_ids

Comma-separated list of market segments, e.g. 70

--enable_market_by_order

Enables the processing of MarketByOrder (requires the MBOFD feed from CME)

Environments#

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

roq::ReferenceData

Incremental

MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63

roq::MarketStatus

Incremental

SecurityStatus30, MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63

roq::TopOfBook

Incremental

MDIncrementalRefreshBook46

roq::MarketByPriceUpdate

Incremental

MDIncrementalRefreshBook46

roq::MarketByOrderUpdate

Incremental

MDIncrementalRefreshBook46, MDIncrementalRefreshOrderBook47

roq::TradeSummary

Incremental

MDIncrementalRefreshTradeSummary48, MDIncrementalRefreshTradeSummaryLongQty65

roq::StatisticsUpdate

Incremental

MDIncrementalRefreshDailyStatistics49, MDIncrementalRefreshSessionStatistics51, MDIncrementalRefreshSessionStatisticsLongQty67, MDIncrementalRefreshVolume37

Event

Stream

Messages

Comments

roq::ReferenceData

Instrument Definition

MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55, MDInstrumentDefinitionSpread56, MDInstrumentDefinitionFixedIncome57, MDInstrumentDefinitionRepo58, MDInstrumentDefinitionFX63

roq::MarketStatus

Instrument Definition

MDInstrumentDefinitionFuture54, MDInstrumentDefinitionOption55

roq::TopOfBook

roq::MarketByPriceUpdate

MBP Market Recovery

SnapshotFullRefresh52, SnapshotFullRefreshLongQty69

roq::MarketByOrderUpdate

MBO Market Recovery

SnapshotFullRefreshOrderBook53

roq::TradeSummary

roq::StatisticsUpdate

Statistics#

TBD

Order Management#

Event

Stream

Messages

Comments

roq::OrderUpdate

OrderEntry

ExecutionReportTradeOutright525, ExecutionReportTradeSpread526, ExecutionReportTradeSpreadLeg527

roq::TradeUpdate

OrderEntry

ExecutionReportTradeOutright525, ExecutionReportTradeSpread526, ExecutionReportTradeSpreadLeg527

Event

Stream

Messages

Comments

roq::OrderUpdate

OrderEntry

ExecutionReportStatus532

roq::TradeUpdate

Unavailable

Event

Stream

Messages

Comments

roq::CreateOrder

OrderEntry

NewOrderSingle514

roq::ModifyOrder

OrderEntry

OrderCancelReplaceRequest515

roq::CancelOrder

OrderEntry

OrderCancelRequest516

roq::CancelAllOrders

OrderEntry

OrderMassActionRequest529

Event

Stream

Messages

Comments

roq::OrderAck

OrderUpdate

ExecutionReportNew522, ExecutionReportReject523, ExecutionReportModify531, ExecutionReportCancel534, BusinessReject521

Order Types#

Type

Comments

MARKET

Mapped to 'MarketwithProtection' (SBE)

LIMIT

Mapped to 'Limit' (SBE)

Time in Force#

Type

Comments

GFD

Mapped to 'Day' (SBE)

GTC

Mapped to 'GoodTillCancel' (SBE)

IOC

Mapped to 'FillAndKill' (SBE)

FOK

Mapped to 'FillOrKill' (SBE)

Position Effect#

Note

Not supported

Execution Instructions#

Note

Not supported

Templates#

Note

Not supported

Account Management#

Event

Stream

Messages

Comments

roq::PositionUpdate

Unavailable

roq::FundsUpdate

Unavailable

Event

Stream

Messages

Comments

roq::PositionUpdate

Unavailable

roq::FundsUpdate

Unavailable

Streams#

Type

Comments

UDP

Primary purpose

  • Reference data

Type

Comments

UDP

Primary purpose

  • MbP snapshot

Type

Comments

UDP

Primary purpose

  • MbO snapshot

Type

Comments

UDP

Primary purpose

  • MbP incremental

Type

Comments

TCP

Primary purpose

  • iLink

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.

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 reports LastPx as the order’s limit price. This should normally be expected to be the (average) price of the fill(s).