CME Market Data Over WebSocket API

With CME Market Data Over WebSocket API, clients can access easy-to-use real-time CME Group market data feeds. CME Market Data Over WebSocket API supports JavaScript Object Notation (JSON) format. The service provides an easy, low-cost, and highly scalable format to drive trading analysis, risk management, or distribution. Data available in this universal format includes top of book information, trade execution, and product statistics including settlement, total daily volume, and open interest. CME Market Data Over WebSocket API is a service powered by Google Cloud for market data distribution. 

Contents

Product Offerings

CME Market Data Over WebSocket API supports CME Globex sourced futures and options products from the following Designated Contract Markets (DCM):

  • CME

  • CBOT

  • COMEX

  • NYMEX

  • GME

Supported Market Data

The following market data types are available via Google Cloud WebSocket feed:

  • Top of Book Topic - Provides a 1-deep Market by Price (MBP) book for an instrument

  • Market Stats Topic - Includes Open Interest, Settlement and Traded Volume

  • Trade Information Topic - Provides trade updates for an instrument

  • Session Management

Onboarding and Entitlements

Client Onboarding / Authorization and Entitlement

A registered OAuth API ID is required to access the CME Market Data Over WebSocket API services. API IDs for CME Group Logins are created and managed in the CME Customer Center - My Profile menu. Client API IDs must also be entitled prior to accessing CME APIs.

New clients should consult the CME Group Login registration process page for more information.

Complete the step(s) that are applicable to your account:

New Clients

Clients with Existing CME Group Logins

New Clients

Clients with Existing CME Group Logins

  1. Create a CME Group Login with multi-factor authentication.

  2. After creating and activating a CME Group Login ID, login to CME Customer Center under My Profile and create an OAuth API ID.

  3. Client API IDs must be entitled. To request access to the CME APIs, contact Global Account Management (GAM).

  1. Login to CME Customer Center and under My Profile create an OAuth API ID.

  2. Client API IDs must be entitled. To request access to the CME APIs, contact Global Account Management (GAM).

Accessing CME Market Data over WebSocket API

To access CME Market Data Over WebSocket API, an OAuth API ID and access token are required. Client systems are allowed to use any API tool of their choice to request and refresh access tokens to access order entry Endpoints using the OAuth protocol.  Endpoints are used by client applications to communicate with the OAuth Authorization Server to request and refresh access tokens.  Additional information on on OAuth 2.0 adoption can be found in the Client API Service Adoption using OAuth 2.0 Protocol documentation.

OAuth 2.0 Authorization Server Access Token Retrieval Endpoints

The below Endpoints are available to request and refresh access tokens. 

OAuth 2.0 Authorization Server Endpoints

OAuth 2.0 Authorization Server Endpoints

Detail

New Release

Production

OAuth Token Endpoint

https://authnr.cmegroup.com/as/token.oauth2

https://auth.cmegroup.com/as/token.oauth2

Connectivity

Once clients have completed onboarding and granted entitlements they can access the CME Market Data Over WebSocket API endpoints.  WebSocket API supports WSS connections over the internet.

Detail

Path

Detail

Path

Google Cloud WebSocket Path

wss://markets.api.cmegroup.com/marketdatastream/v1

Web Socket Initiation must have the header parameter "Authorization" with value "Bearer" pre-pended to the OAuth token (including a space separator).

Example: "Bearer <Oauth Access token>"

WebSocket API Endpoints

WebSocket API Endpoints

Detail

New Release/Certification

Production

WebSocket API

wss://markets.api.uat.cmegroup.com/marketdatastream/v1

wss://markets.api.cmegroup.com/marketdatastream/v1

OWASP Compliance

The APIs are hosted on Google Cloud and protected by Google Cloud Armor with preconfigured Web Application Firewall(WAF) rules leveraging the OWASP Top 10 rules.

Client systems should utilize the OWASP Top 10 rules. 

Messaging Information

This section provides detailed message information.

Trade Information

Trade information is available via CME Market Data over Websocket API. The messageType for trades is "TRD"

Book Management Information

CME Market Data Over WebSocket API provides a 1-deep Market by Price (MBP) book for an instrument. The CME Market Data Over WebSocket API book messages use an overlay approach to book management. Overlay book management completely restates the book with each new book update.  Book updates, per instrument, are sent at a maximum of every 500 milliseconds.  The messageType for top of book orders is "TOB".

Daily Statistics Information

Daily statistics provide statistical data for the trading day including:

  • Cleared Volume  

  • Open Interest 

  • Settlement Price 

The messageType for daily statistics is "STAT".

Cleared Volume

Cleared Volume is the number of contracts that have been through the clearing process for an active instrument for the previous trading day.  Cleared Volume is updated once per day throughout the trading week.

Open Interest

Open Interest is the total number of contracts per instrument that are not yet offset or fulfilled from the previous trading day. Open Interest is updated once per day throughout the trading week.

Settlement Price

CME Market Data Over WebSocket API sends the following types of settlement prices:

  • Final/Preliminary

  • Actual/Theoretical

  • Settlement at Trading Tick/Settlement at Clearing Tick

For a settlement price overview, refer to the Settlement Prices topic.

Settlement Price Attribute Examples

EXAMPLE #

KEY

ATTRIBUTE

VALUE

MEANING

EXAMPLE #

KEY

ATTRIBUTE

VALUE

MEANING

1

payload.tradeStatistics

settlementFinal

0

Preliminary Actual Settlement at Trading Tick

payload.tradeStatistics

settlementActual

1

payload.tradeStatistics

settlementRounded

1

2

payload.tradeStatistics

settlementFinal

0

Preliminary Actual Settlement at Clearing Tick

payload.tradeStatistics

settlementActual

1

payload.tradeStatistics

settlementRounded

0

3

payload.tradeStatistics

settlementFinal

1

Final Theoretical Settlement at Trading Tick

payload.tradeStatistics

settlementActual

0

payload.tradeStatistics

settlementRounded

1

4

payload.tradeStatistics

settlementFinal

1

Final Actual Settlement at Trading Tick

payload.tradeStatistics

settlementActual

1

payload.tradeStatistics

settlementRounded

1

5

payload.tradeStatistics

settlementFinal

1

Final Actual Settlement at Clearing Tick

payload.tradeStatistics

settlementActual

1

payload.tradeStatistics

settlementRounded

0

Connectivity Processing 

CME Market Data Over WebSocket API is a bi-directional communication allowing clients access to CME Globex market data in real-time in JSON format.

Messaging Summary

The diagram below shows the message flow for CME Market Data Over WebSocket API.

 

WebSocket Connection

Login Status Messages

Upon a websocket connection, CME Market Data Over WebSocket API sends one of the following login status messages.  

Stage

Message Name

messageType

From

Purpose

Stage

Message Name

messageType

From

Purpose

Initialization

CME Globex Status

LOGIN_STATUS

CME Globex to Client System

Accepts connection

Login Reject

LOGINERR

CME Globex to Client System

Rejects connection

Message Requests

A subscription message allows client systems to recover and to subscribe a product code. A Subscription is sent after a successful login.  Subscription requests and book states are reset at session disconnection. Therefore, subscriptions must be re-established after reconnection and a successful login.

Subscription Message

Message Name

messageType

subscriptionMessageTypes

Status

From | To

Purpose

Message Name

messageType

subscriptionMessageTypes

Status

From | To

Purpose

Subscribe/ Unsubscribe

UNSUBSCRIBE

 

 

Client System to CME Globex

Unsubscribe

Subscription Status

SUBSCRIPTION_STATUS

  • TOB (Top of Book)

  • TRD (Trade)

  • STAT (Statistics)

  • SUBSCRIBED

  • UNSUBSCRIBED

CME Globex to Client System

Subscription Confirmation

Subscription Error

SUBSCRIPTION_ERROR

  • TOB (Top of Book)

  • TRD (Trade)

  • STAT (Statistics)

 

CME Globex to Client System

Subscription Rejection

Additional Considerations

Sequence Number

Sequence Number (field name sequenceNumber) is a unique number per each CME to client message. Each topic has its own separate set of sequence numbers that increment sequentially with each message and reset weekly. 

Heartbeat

Heartbeat messages are generated by the API every 10 seconds, independently for each authenticated socket connection in periods of no activity. They allow the connection to remain open when no market data messages are being published. The messageType for the heartbeat is "HEARTBEAT".  Users of the API should monitor for these heartbeat messages so that they can identify if a Websocket connection has gone stale. If a connection to the API is open but no heartbeat messages are detected within the ranges specified, this indicates that the Websocket connection is stale and that clients should close the active connection, open a new connection and re-subscribe for market data.

System Recovery Processing

In the event of a CME Websocket Market Data failure, client systems must reestablish a connection and re-subscribe via request messages. 

Product and Instrument Referential Data

CME Market Date Over WebSocket API does not support instrument referential data. Clients must obtain instrument referential data from one of the many other services offered by CME Group, including

SERVICE

DESCRIPTION

SERVICE

DESCRIPTION

CME Reference Data API 

Product and instrument referential data can be obtained via CME Reference Data API.

  • The MDP Websocket field "Id" maps to the Reference data API instrument field "globexSecurityId".

 

 




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.