This section describes the implementation and protocol for Order messages transmitted from the Binary Market Data
Gateway. These messages are encoded using the Simple Binary Encoding (SBE) format, with fields encoded in big-endian
byte order.
Every message begins with the SBE Header, which describes the message payload.
| Offset | Length | Name | Description | Type |
|---|
| 0 | 2 | Block Length | The number of fixed sized bytes in the message body. | Unsigned 16-bit integer |
| 2 | 1 | Template ID | Identifier of the message type. | Unsigned 8-bit integer |
| 3 | 1 | Schema ID | Identifier of the message schema. | Unsigned 8-bit integer |
| 4 | 2 | Version | Identifier of the message version. | Unsigned 16-bit integer |
Versioning
Versioning of the Order Message schema is encoded within the Common SBE Header. The first 8 bits of the version field
represents the major version of the schema, and the subsequent 8 bits represents the minor version of the schema. A
version of 0300 in hex therefore represents the semantic version 2.0.
Messages
InstrumentDirectory
This message will be emitted as part of a Snapshot to inform the client of available instruments.
| Name | Value |
|---|
| Block Length | 46 |
| Template ID | 1 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 5 | Base Currency | Base Currency Symbol | 5-byte character sequence |
| 35 | 5 | Quote Currency | Quote Currency Symbol | 5-byte character sequence |
| 40 | 2 | Unit Multiplier | The Unit Multiplier of the Instrument | Signed 16-bit integer |
| 42 | 1 | Is Test Symbol | If the Instrument is a Test Instrument | Boolean Type |
| 43 | 8 | MPV | The price increment of the instrument | FixedPointDecimal |
| 51 | 1 | Instrument Type | Type of Instrument | 1 byte character |
Instrument Type Values
| ASCII Value | Name |
|---|
| '1' | Spot |
| '2' | Perpetual Futures |
Instrument Trading Status
This message will be emitted as part of a Snapshot to inform the client of the status of available instruments.
| Name | Value |
|---|
| Block Length | 26 |
| Template ID | 2 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 31 | Instrument Trading Status | The Trading Status of the Instrument | 1-byte character sequence |
| 31 | 1 | Instrument Trading Status Reason | The Reason for this Status | 1-byte character sequence |
Instrument Trading Status Values
| ASCII Value | Name |
|---|
| 'H' | Halted |
| 'Q' | Quoting |
| 'L' | Limit Only Trading |
| 'T' | Trading |
Instrument Trading Status Reason Values
| ASCII Value | Name |
|---|
| 'X' | None |
| 'A' | Administrative |
Trading Session Status
This message will be emitted as part of a Snapshot to inform the client of the status of the trading session
| Name | Value |
|---|
| Block Length | 9 |
| Template ID | 3 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 1 | Session status | Status representing if the Exchange is open or closed | 1-byte character sequence |
Trading Session Status Values
| ASCII Value | Name |
|---|
| '1' | Trading |
| '2' | Closed |
Snapshot Complete
This message will be emitted as part of a Snapshot to indicate the end of the snapshot.
| Name | Value |
|---|
| Block Length | 16 |
| Template ID | 4 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 8 | Sequence Number | The current broadcast Sequence number | Signed 64-bit integer |
Order Added
This message will be emitted when an order has been added to the book or as part of a snapshot.
| Name | Value |
|---|
| Block Length | 58 |
| Template ID | 10 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 8 | Order ID | Unique identifier of the Order | Signed 64-bit integer |
| 38 | 8 | Correlation ID | Correlating ID between this message and the Order feed. This value will always be equal to the Order ID | Signed 64-bit integer |
| 46 | 1 | Side | The side of the order being added | 1 byte character |
| 47 | 8 | Quantity | The total quantity being added | Order Quantity |
| 55 | 8 | Price | The price of the new order | FixedPointDecimal |
| 63 | 1 | Retail Indicator | The retail disposition of the order | 1 byte character |
Order Deleted
This message will be emitted when an order has been removed from the book. This message will not be emitted when an
order is fully filled.
| Name | Value |
|---|
| Block Length | 32 |
| Template ID | 11 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 8 | Order ID | Unique identifier of the Order | Signed 64-bit integer |
Order Reduced
This message will be emitted when an order has been reduced in quantity.
| Name | Value |
|---|
| Block Length | 40 |
| Template ID | 12 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 8 | Order ID | Unique identifier of the Order | Signed 64-bit integer |
| 38 | 8 | Quantity | The new quantity | Order quantity |
Order Executed
This message will be emitted when an order on the book has been executed against. When the quantity executed reduces the
remaining quantity to zero, consumers of this message should consider the order to be removed from the book. Otherwise,
any outstanding quantity remains on the book with the same priority as the original order.
| Name | Value |
|---|
| Block Length | 64 |
| Template ID | 13 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 8 | Order ID | Unique identifier of the Order | Signed 64-bit integer |
| 38 | 16 | Trade ID | Unique identifier of the Trade | 2 Signed 64-bit integers |
| 54 | 8 | Quantity | The total quantity executed | Order quantity |
| 62 | 8 | Price | The executed price of the order | Fixed Point Decimal |
Incremental Trading Metric
| Name | Value |
|---|
| Block Length | 33 |
| Template ID | 14 |
| Schema ID | 6 |
| Version | 514 |
Payload
| Offset | Length | Name | Description | Type |
|---|
| 0 | 6 | Header | Common SBE Header | |
| 6 | 8 | Timestamp | The timestamp when the event occurred, in nanoseconds | Signed 64-bit integer |
| 14 | 16 | Token ID | Unique identifier of the Order instrument | 16-byte character sequence |
| 30 | 1 | MdEntryType | Type of trading metric | 1-byte character |
| 31 | 8 | MDEntryValue | Value of trading metric | FixedPointDecimal |
MdEntryType Values
| ASCII Value | Name |
|---|
| '3' | IndexValue |
| 'm' | PreliminaryMarkPrice |
| 'n' | FinalMarkPrice |
| 'p' | PreliminaryFundingRate |
| 'f' | FinalFundingRate |
| 'C' | OpenInterest |
Common Field Types
Timestamp
| Length | Type | Name | Description |
|---|
| 8 | Signed 64-bit integer | Timestamp | Time represented as the number of nanoseconds since the UNIX epoch. |
Token ID
| Length | Type | Name | Description |
|---|
| 16 | 16-byte character sequence | Token ID | Unique identifier of an Instrument. |
Order ID
| Length | Type | Name | Description |
|---|
| 8 | Signed 64-bit integer | Order ID | Unique identifier of an Order. |
Trade ID
Trades are identified using a 128-bit globally unique value. They are expressed as two signed 64-bit integers.
| Offset | Length | Type | Name | Description |
|---|
| 0 | 8 | Signed 64-bit integer | Upper Bits | The most significant bits of the ID. |
| 8 | 8 | Signed 64-bit integer | Lower Bits | The lease significant bits of the ID. |
Side
| ASCII Value | Name |
|---|
| 'B' | Buy |
| 'S' | Sell |
Order Quantity
This field represents the quantity that is present on an order or has been executed against an order as part of a trade.
It is encoded as a signed 64-bit integer. To obtain the true quantity value, consumers of this data need to multiply the
quantity by 10^(unit multiplier). The unit multiplier is available on the instrument directory. For example, an order
quantity of 123456789 with a corresponding instrument unit multiplier of -8 would represent the decimal number
1.23456789. This was calculated by 123456789 * 10^(-8).
| Length | Type | Name | Description |
|---|
| 8 | Signed 64-bit integer | Order Quantity | |
FixedPointDecimal (Used in Price and MPV)
This field represents a fixed point decimal, encoded as a signed 64-bit integer with a constant exponent of -8. For
example, a value 123456789 would represent the decimal number 1.23456789.
| Length | Type | Name | Description |
|---|
| 8 | Signed 64-bit integer | Price | |
Retail Indicator
| ASCII Value | Name |
|---|
| '1' | Normal |
| '2' | Designated Retail |
| '3' | Retail Liquidity Provider |