CME STP FIXML Core

This topic describes the common and core rules of engagement for CME STP FIXML, which are applicable to all markets and venues of CME Group.

Use this search bar to search topics within CME STP FIXML Core:

Contents:

Connectivity

Clients can connect to CME STP FIXML API via the following options:

New Release 

Beginning Thursday, June 20, 2024 (New Release) clients should use the below New Service (GC) URL.

The Current Service (DC3) URL will be decommissioned; at a date to be announced.

Connectivity TypeAsset ClassCurrent Service URL (DC3)New Service URL (GC)

Internet (only)

URL uses certificates signed by an official trusted Certificate Authority (CA). Additional certificates are not required.

Allhttps://servicesnr.cmegroup.com/cmestp/queryhttps://posttrade.api.uat.cmegroup.com/cmestp/query

Production

Beginning Sunday, July 28, 2024 (Production) clients should use the below New Service (GC) URL.

The Current Service (DC3) URL will be decommissioned; at a date to be announced.

Connectivity TypeAsset ClassCurrent Service URL (DC3)New Service URL (GC)

Internet (only)

URL uses certificates signed by an official trusted Certificate Authority (CA). Additional certificates are not required.

Allhttps://services.cmegroup.com/cmestp/queryhttps://posttrade.api.cmegroup.com/cmestp/query

Disaster Recovery Considerations

During a disaster recovery (DR) event clients will automatically be directed to the DR instance of CME STP. Clients do not need to make any connectivity changes.

In the event of a DR, client systems should ensure that they can restart their Subscriptions and/or Query for missing trades.

Session Layer Management

Client systems are required to use HTTP POST method to the URL https://{path}/cmestp/query endpoint, where the "path" is to be replaced with URLs provided in the connectivity section for a given environment.

The body of the POST method is the XML for Trade Capture Report Request message. All outbound and inbound FIXML messages are XML documents denoted by XML prolog <?xml version="1.0" encoding="UTF-8"?> with encoding being optional and defaults to "UTF-8" on requests. This will be the first line in requests and responses.

CME STP FIXML uses Basic Authorization over HTTPS for user authentications. Client systems create a secret key by Base64 encoding their "STP API ID:Password" and use the "Authentication" HTTP header parameter each time a POST method is called.

CME STP FIXML only supports the HTTP POST method. Other HTTP methods are unsupported.

HTTP Header Parameters

Following section describes HTTP Header Parameters.

HTTP Header ParameterPresenceValue
AuthorizationRequiredBasic <Base64 encoded secret key>
Content-TypeRequiredtext/plain or text/xml
  • Interaction with the CME STP FIXML API is stateless.
  • The CME STP FIXML service will send a token in response to valid subscription requests and query requests where the response requires multiple pages.
  • Client systems continue the subscription or request the next page(s) of the query by sending the token from the prior response, on subsequent POST requests.
  • Both Client systems and CME STP FIXML will use the x-cme-token custom HTTP Request Header to transmit this token.
  • Successful HTTP POST responses will have standard HTTP status of 200.

CME Group recommends that client systems have the ability to handle a token length of up to 1500 bytes.

Optional Attributes in the FIXML Element

The following optional attributes can be included on the FIXML element of each message sent to CME STP FIXML and when present only valid values are accepted.

Responses from CME STP FIXML will have these attributes in the FIXML Element.

FIXML Element

Description

Valid Value

XPath

FIX Version Number

Indicates the version of FIX being used (including Service Pack).

5.0 SP2

/FIXML/@v

Schema Release Date

Indicates the release date of the FIXML Schema.

20090815

/FIXML/@s

FIXML Extension Version

Indicates the FIX Extension version.

109

/FIXML/@xv

Custom Application Version

Indicates the Custom Application version.

CME.0001

/FIXML/@cv

Standard FIXML Header

All FIXML request messages from the client systems must include a Standard Header with the following attributes. The following table indicates fields sent on messages from the Client system to CME STP FIXML.

In response, CME STP FIXML will swap values of:

  • Hdr/@SID with Hdr/@TID
  • Hdr/@SSub with Hdr/@TSub

Field

Description

Presence

Valid Value

XPath

Sender Comp ID

Indicates the sender of the message. Should be a firm level identifier such as Trading firm name or GFID

RequiredAssigned by CME

Hdr/@SID

Sender Sub ID

Indicates the sender entity. This value must match the username (API ID) used with HTTP Basic authentication, and must be in uppercase.

RequiredAssigned by CME

Hdr/@SSub

Target Comp ID

Indicates the recipient of the message.

Optional

CME

Hdr/@TID

Target Sub ID

Indicates the recipient entity.

Optional

STP

Hdr/@TSub

XPath to HDR Element in the Client system requests: FIXML/TrdCaptRptReq/Hdr

XPath to HDR Element in CME STP FIXML Reponses:

  • Successful response: FIXML/Batch/Hdr
  • Failure response: FIXML/TrdCaptRptReqAck/Hdr

Trade Queries and Subscriptions

The following section outlines the trade queries and subscription functionality for CME STP FIXML.

Data Retrieval

CME STP FIXML supports data retrieval using subscriptions and queries: 

  • Queries: Client systems can request a snapshot of trades with /TrdCptRepReq/ReqTyp=1 (Matched trades) and  /TrdCptRepReq/SubReqTyp=0 (Snapshot) limited by StartTm and optional EndTm attributes. 
  • Subscriptions: Client systems can request a snapshot and initiate a continued subscription for trades with/TrdCptRepReq/ReqTyp=1 (Matched trades) and  /TrdCptRepReq/SubReqTyp=1 (Snapshot + Updates) with the optional StartTm Attribute.

For both Queries and Subscriptions client systems must supply a unique identifier with each request in /FIXML/TrdCaptRptReq/@ReqID which the FIXML API will echo back in /FIXML/Batch/TrdCaptRpt/@ReqID for successful requests, and in /FIXML/TrdCaptRptReqAck/@ReqID in case of errors. This enables the user to match the request with the resulting response message. When continuing a Subscription or a Query, client systems may reuse the original @ReqID or may send a new identifier. The API will respond with the @ReqID sent on the latest request.

Client systems must be able to handle unexpected tags/attributes, in CME STP FIXML messages, without failing.

Subscription and Query Parameters

The following general parameters are used to filter the query and/or subscription results. Omitting, changing, or adding filter criteria may cause undesired results.  Every continuation of a Subscription or Query must contain all of the filter criteria of the original subscription or query. Times below, e.g. Start Time and End Time, use the XML xs:dateTime syntax in ISO 8601 format. Time should be entered in UTC Timestamp format.

Parameter

Usage/Description

XPath

Party ID and Role

(e.g. Trading Firm, Asset Manager, Broker)

Required

Multiple Parties allowed, and each Party ID must be in a separate Pty element.

/FIXML/TrdCaptRptReq/Pty/@ID

/FIXML/TrdCaptRptReq/Pty/@R

Trade DateOptional/FIXML/TrdCaptRptReq/TrdCapDt/@TrdDt
Clearing Business DateOptional/FIXML/TrdCaptRptReq/@BizDt
Venue (Input Source)Optional/FIXML/TrdCaptRptReq/@InptSrc
ProductOptional/FIXML/TrdCaptRptReq/Instrmt/@ID
Product TypeOptional/FIXML/TrdCaptRptReq/Instrmt/@SecTyp
ExchangeOptional/FIXML/TrdCaptRptReq/Instrmt/@Exch
SymbolOptional/FIXML/TrdCaptRptReq/Instrmt/@Sym
Trade IDOptional/FIXML/TrdCaptRptReq/@TrdID
Secondary Trade IDOptional/FIXML/TrdCaptRptReq/@TrdID2
Client Order IDOptional/FIXML/TrdCaptRptReq/@ClOrdID
Outright, Spread, or Leg Level RequestRequired/FIXML/TrdCaptRptReq/@MLegRptTyp
Start Time

Optional on Requests

Required on Queries

/FIXML/TrdCaptRptReq/@StartTm
End Time

Not Allowed on Requests

Optional on Queries

/FIXML/TrdCaptRptReq/@EndTm

Batch Container

CME STP FIXML returns trades (FIXML Trade Capture Report messages) to clients by encapsulating a single Standard Header followed by zero or more Trade Capture Report messages within the /FIXML/Batch element. The Trade Capture Report messages themselves will not contain Hdr elements. CME STP FIXML may send an empty Batch, containing a Hdr but no TrdCaptRpt messages, either because a Query returned no results, or because no new activity occurred for a Subscription. However, in the case of an empty batch for a Subscription, the user must still extract the token and use it in subsequent requests. A batch can return a maximum of 250 Trade Capture Report messages. 

Example FIXML Batch
<?xml version="1.0" encoding="UTF-8"?>
<FIXML v="5.0 SP2" s="20090815" xv="109" cv="CME.0001">
    <Batch>
        <Hdr SID="CME" TID="RYAN" SSub="STP" TSub="RYAN123"/>    
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
		...
	</Batch>
</FIXML>


Subscription and Query requests (FIXML Trade Capture Report Request messages) sent by the client system to CME STP FIXML, as well as application level error messages (FIXML Trade Capture Report Request Ack messages) sent by the CME STP FIXML to the client systems, will not use the Batch container. The FIXML will contain the element for the message directly. The application level message itself will contain the Standard Header, e.g. /FIXML/TrdCaptRptReq/Hdr.

Queries

Client systems can request a snapshot of trades with /TrdCptRepReq/ReqTyp=1 (Matched trades) and  /TrdCptRepReq/SubReqTyp=0 (Snapshot) limited by the required  StartTm and optional EndTm attributes.

  • If the query is valid and there are trades for the requested time frame, CME STP FIXML will respond with HTTP status of 200 (Success) and Batch of Trade Capture Reports.
    • The x-cme-token custom HTTP header parameter will be populated with a token value if there are more Trade capture reports for client systems to continue their query.
  • If the query is valid and there are no trades for the requested time frame, an empty Batch is returned.
Example Request

HTTP Post with Trade Capture Report Request

POST /cmestp/query HTTP/1.1
Host: servicesnr.cmegroup.com
Content-Type: text/plain
Authorization: Basic <Base64 encoded secret key>
Content-Length: 637

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v = "5.0 SP2" s = "20090815" xv = "109" cv = "CME.0001">
<!-- ReqTyp = "1" (Matched Trades) SubReqTyp = "0" (Snapshot) -->
    <TrdCaptRptReq ReqID = "Testvalue" ReqTyp = "1" SubReqTyp = "0" MLegRptTyp = "2" StartTm="2024-09-23T00:00:00">
        <Hdr SID = "Test" TID = "CME" SSub = "Test1" TSub = "STP"/>
        <Pty ID = "Party value" R = "7"/>
    </TrdCaptRptReq>
</FIXML>
Example Response

HTTP Response Code = 200 (Success)

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v="5.0 SP2" s="20090815" xv="109" cv="CME.0001">
    <Batch>
        <Hdr SID="CME" TID="Test" SSub="STP" TSub="Test1"/>    
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
		...
	</Batch>
</FIXML>

Subscriptions

Client systems can request a snapshot and initiate a continued subscription to trades with/TrdCptRepReq/ReqTyp=1 (Matched trades) and /TrdCptRepReq/SubReqTyp=1 (Snapshot + Updates) with optional StartTm Attribute. CME STP FIXML will respond with HTTP status of 200 (Success) and Batch of Trade Capture Reports if there are any available. An empty Batch will be returned if there are no trades to report.

  • In response to a successful subscription request,  CME STP FIXML will return a token in the x-cme-token custom HTTP header parameter.
  • If the optional StartTm Attribute isn't provided in the subscription request, CME STP FIXML will begin the subscription at the time the request was received.
Example Request

HTTP Post with Trade Capture Report Request

POST /cmestp/query HTTP/1.1
Host: servicesnr.cmegroup.com
Content-Type: text/plain
Authorization: Basic <Base64 encoded secret key>
Content-Length: 637

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v = "5.0 SP2" s = "20090815" xv = "109" cv = "CME.0001">
<!-- ReqTyp = "1" (Matched Trades) SubReqTyp = "1" (Snapshot+Subscription) -->
    <TrdCaptRptReq ReqID = "Testvalue" ReqTyp = "1" SubReqTyp = "1" MLegRptTyp = "2" StartTm="2024-09-23T00:00:00">
        <Hdr SID = "Test" TID = "CME" SSub = "Test1" TSub = "STP"/>
        <Pty ID = "Party value" R = "7"/>
    </TrdCaptRptReq>
</FIXML>


Example Response

HTTP Response Code = 200 (Success)

HTTP Header parameter x-cme-token will have the token value for the next polling request

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v="5.0 SP2" s="20090815" xv="109" cv="CME.0001">
    <Batch>
        <Hdr SID="CME" TID="Test" SSub="STP" TSub="Test1"/>    
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
		...
	</Batch>
</FIXML>

Continuing a Subscription

To continue polling for trades after a successful subscription, client systems must POST Trade Capture Report requests with:

  • /TrdCptRepReq/ReqTyp=3 (Unreported trades matching the criteria) and /TrdCptRepReq/SubReqTyp=1 (Snapshot + Updates)/TrdCptRepReq/ReqTyp=3 (Unreported trades matching the criteria) and /TrdCptRepReq/SubReqTyp=1 (Snapshot + Updates)
  • Populate the x-cme-token custom HTTP header parameter, in the POST, with the most recent token value received from CME STP FIXML. Populate the x-cme-token custom HTTP header parameter, in the POST, with the most recent token value received from CME STP FIXML.
  • Must include the filter criteria of the original subscription.

Client systems should continue polling for new trades with request intervals no more frequent than three seconds.

Example Request

HTTP Post with Trade Capture Report Request with x-cme-token for continued polling of trades

POST /cmestp/query HTTP/1.1
Host: servicesnr.cmegroup.com
Content-Type: text/plain
x-cme-token: eyJmcm9tVHJhbnNhY3R
Authorization: Basic <Base64 encoded secret key>
Content-Length: 637

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v = "5.0 SP2" s = "20090815" xv = "109" cv = "CME.0001">
<!-- ReqTyp = "3" (Unreported Trades) SubReqTyp = "1" (Snapshot+Subscription) -->
    <TrdCaptRptReq ReqID = "Testvalue" ReqTyp = "3" SubReqTyp = "1" MLegRptTyp = "2" StartTm="2024-09-23T00:00:00">
        <Hdr SID = "Test" TID = "CME" SSub = "Test1" TSub = "STP"/>
        <Pty ID = "Party value" R = "7"/>
    </TrdCaptRptReq>
</FIXML>


Example Response

HTTP Response Code = 200 (Success)HTTP Response Code = 200 (Success)

HTTP Header parameter x-cme-token will have the token value for the next polling value

<?xml version="1.0" encoding="UTF-8"?>
<FIXML v="5.0 SP2" s="20090815" xv="109" cv="CME.0001">
    <Batch>
        <Hdr SID="CME" TID="Test" SSub="STP" TSub="Test1"/>    
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
        <TrdCaptRpt ...>
		...
		</TrdCaptRpt>
		...
	</Batch>
</FIXML>

Restarting a Subscription

Client systems should follow the same process as starting a subscription as detailed above. It is recommended that client systems specify a value in /TrdCptRepReq/@StartTm Attribute with one or more minutes prior to the value of /FIXML/TrdCaptRpt/@LastUpdateTm from the last trade they received, to cover any missing trades.

Duplicate message detection

To detect duplicate trades, client systems can use /FIXML/TrdCaptRpt/@RptId, the unique message ID for the trade being reported.

Legs of certain spread trades can share the same message ID.  However, /FIXML/TrdCaptRpt/@TrdID2 and /FIXML/TrdCaptRpt/@RptID (together) will form a unique key.

Error handling

For new or ongoing subscriptions or queries, Trade Capture Report requests using HTTP POST may generate the following HTTP error codes:

Error

Description

Client action

40x (Bad Request)

In cases of:

  • Malformed data in the body of the POST requests
  • CME STP FIXML cannot parse valid FIXML or fail validation rules
  • Authorization failure - invalid credentials

The CME STP FIXML system will respond with a Trade Capture Report Request Ack message, indicating the nature of the error in the "Txt" attribute.

Clients will fix the issues on their end and restart subscription or query.

406 (Not acceptable)

The x-cme-token value used in the polling request is no longer valid.

Client systems should initiate a new Subscription.

500 (Server Error)Used when the user request is valid, but the API is experiencing an internal error and cannot process the request at this time. The API will send a Trade Capture Report Request Ack message in the response payload.

Client systems can continue to make periodic requests until a successful response.




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.