CME Market Data Over WebSocket API - Message Examples
This section provides messaging examples for CME Market Data Over Websocket API.
Example 1 - Login Authenticated
{
"header":
{
"messageType": "LOGINSTATUS",
"sentTime": "2023-11-21T16:47:52.155000000Z",
"version": "1.0",
"sequenceNumber": "0"
},
"payload":
{
"status": "authenticated"
}
}
Example 2 - Trade Subscription for a Single Product
In this example, a client system successfully subscribes to a single product.
Client Request
{
"header":
{
"messageType": "SUBSCRIBE",
"version": "1.0",
"requestId": "1",
"token": ""
},
"payload":
{
"subscriptionMessageTypes":
[
"TRD"
],
"subscriptions":
[
{
"productType": "FUT",
"productCode": "CL"
}
]
}
}
CME WebSocket API Response
{
"header":
{
"messageType": "SUBSCRIPTION_STATUS",
"requestId": "1",
"sentTime": "2023-11-28T15:46:20.532000000Z",
"version": "1.0",
"sequenceNumber": "2"
},
"payload":
{
"status": "SUBSCRIBED",
"subscriptionMessageTypes":
[
"TRD"
],
"subscriptions":
[
{
"productType": "FUT",
"productCode": "CL"
}
]
}
}
Example 3 - Trade Subscription using filters
In this example, a client system is using market data subscription filters to filter by month/year (periodCodes ) and message type (spreadReportTypes).
Example 4 - Multiple Top of Book and Trade Subscriptions
In this example, a client system successfully subscribes to multiple products.
Client Request
CME WebSocket API Response
Example 5 - Subscription Request Rejection
In this example a client subscription is rejected due to a "FUT&&&" typo for product code 6A. Consequently both requests, 6A and 6J, are rejected.
Client Request
CME WebSocket API Response
Example 6 - Trade Message
Example 7 - Top of Book Message
Example 8 - Statistics Message
How was your Client Systems Wiki Experience? Submit Feedback
Copyright © 2024 CME Group Inc. All rights reserved.