This topic provides an example of a fully encoded client-to-CME Globex SBE negotiate message for conflated TCP. For more information regarding conflated TCP functionality consult Conflated TCP Market Data Group Processing page.
Contents
Table of Contents |
---|
SBE Schema
The following SBE Schema will be used for the SBE encoding example in the next section.
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<ns2:messageSchema xsi:schemaLocation="http://www.fixtradingcommunity.org/pg/file/fplpo/read/1196759/simple-binary-encoding-rc2xsd SimpleBinary-RC2.xsd" byteOrder="littleEndian" description="20190620" semanticVersion="FIX5SP2" version="0" id="2" package="mdpsessionmgmt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.fixprotocol.org/ns/simple/1.0">
<types>
<type description="HMACVersion" semanticType="String" primitiveType="char" length="13" presence="constant" name="HMACVersion">CME-1-SHA-256</type>
<type description="int32" primitiveType="int32" name="Int32"/>
<type description="String length 20" semanticType="String" primitiveType="char" length="20" name="String20Req"/>
<type description="String length 32 " semanticType="String" primitiveType="char" length="32" name="String32Req"/>
<type description="String length 5" semanticType="String" primitiveType="char" length="5" name="String5"/>
<type description="Unsigned Int16 with NULL" primitiveType="uint16" presence="optional" name="uInt16NULL" nullValue="65535"/>
<type description="uInt32" primitiveType="uint32" name="uInt32"/>
<type description="uInt32NULL" primitiveType="uint32" presence="optional" name="uInt32NULL" nullValue="4294967295"/>
<type description="uInt64" primitiveType="uint64" name="uInt64"/>
<types>
<ns2:message description="Negotiate" id="200" semanticType="MsgTypeNeg" name="Negotiate200" blockLength="78">
<field description="Constant value representing CME HMAC version" id="39003" semanticType="String" name="HMACVersion" type="HMACVersion"/>
...
<field description="Firm ID" id="39007" semanticType="String" name="Firm" type="String5" offset="73"/>
</ns2:message>
</ns2:messageSchema>
Encoding Example
The table below shows the elements of a client-to-CME Globex Negotiate message. The following SBE hexadecimal message will be encoded:
FE CA 01 00 00 00 bf 32 c2 5b ff 5f 15 16 58 00 4e 00 c8 00 02 00 00 00 fa b6 46 9e c9 87 5c d5 5c 3d 59 fb b5 56 b9 d8 89 1c 62 eb 88 7a 3f d1 b0 af 3f 7d 2e 56 38 f7 45 4a 4d 59 54 69 44 68 68 43 47 4e 51 76 6a 71 47 77 56 6e 1e e4 56 95 43 a7 05 00 f8 15 6b 5b ff 5f 15 16 4d 44 34 31 48 4c 49 53 54 32
Info |
---|
CME Globex MDP uses little-endian byte ordering. Therefore, in the example below a hexadecimal value of FE CA is inputted as FE CA in most conversion calculators. |
HEXADECIMAL | TAG | NAME | TYPE | VALUE | DESCRIPTION |
---|---|---|---|---|---|
Technical Header | |||||
FE CA | - | encodingType | String 2 | CAFE | This example uses a TCP technical header within the packet structure. |
01 00 00 00 | - | MsgSeqNum | String 4 | 01 | |
bf 32 c2 5b ff 5f 15 16 | - | SendingTime | String 8 | 1591283593706091199 | The epoch Sending Time value of 1633099253939247451 converts to June 4, 2020 15:13:13.706 UTC |
Message Header | |||||
58 00 | - | MsgSize | uInt16 | 88 | MsgSize is the first field in the the SBE message header. |
4e 00 | - | BlockLength | uInt16 | 78 | |
c8 00 | - | TemplateID | uInt16 | 200 | |
02 00 | - | SchemaID | uInt16 | 2 | |
00 | - | Version | uInt16 | 0 | |
SBE Encoded FIX Message | |||||
- | 39003 | HMACVersion | HMACVersion | CME-1-SHA-256 | This value is defined as a constant in the SBE schema and should not be sent on the wire. |
00 fa b6 46 9e c9 87 5c d5 5c 3d 59 fb b5 56 b9 d8 89 1c 62 eb 88 7a 3f d1 b0 af 3f 7d 2e 56 38 f7 | 39005 | HMACSignature | String32Req | �ú¶FžÉ‡\Õ\=YûµV¹Ø‰bëˆz?Ñ°¯?}.V8÷ | |
45 4a 4d 59 54 69 44 68 68 43 47 4e 51 76 6a 71 47 77 56 6e | 39004 | AccessKeyID | String20Req | EJMYTiDhhCGNQvjqGwVn | |
1e e4 56 95 43 a7 05 00 | 39001 | UUID | uInt64 | 1591283593700382 | |
f8 15 6b 5b ff 5f 15 16 | 39002 | RequestTimestamp | uInt64 | 1591283593700382200 | The epoch Sending Time value of 1591283593700382200 converts to June 4, 2020 15:13:13.700 UTC |
4d 44 34 31 48 | 39006 | Session | String5 | MD41H | |
4c 49 53 54 32 | 39007 | Firm | String5 | LIST2 |