Binary Market Data (TCP) Stream
This section describes the implementation and protocol of the TCP Unicast functionality present in the Binary Market
Data Gateway.
The Binary Market Data Gateway can be configured to listen for Streaming requests from a TCP Endpoint. Market Data
updates received from the Cluster will be made available to clients which request streams from this endpoint.
When a client connects to the streaming endpoint it will receive a Snapshot, followed by a number of streamed updates.
The connection remains active until the client decides to disconnect or the Gateway disconnects from the Cluster.
Authentication
The login token is comprised of your username and passphrase and in your request should be passed in this format:
username:passphrase.
Sequence Example
Successful Login
Rejected Login
Protocol Definition
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type |
| 1 | 2 | Message Length |
Login Request
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (1) |
| 1 | 2 | Message Length |
| 3 | n | Login Token |
Login Request Accepted
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (2) |
| 1 | 2 | Message Length |
Login Request Rejected
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (3) |
| 1 | 2 | Message Length |
| 3 | 1 | Rejected Reason |
Rejected Reason Values
| Ascii Value | Length |
|---|
| 'T' | Bad Token |
| 'A' | Authentication Failure |
Indicates the start of a snapshot stream.
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (4) |
| 1 | 2 | Message Length |
Snapshot Data Message
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (5) |
| 1 | 2 | Message Length |
| 3 | n | Payload |
Indicates the end of a snapshot stream.
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (6) |
| 1 | 2 | Message Length |
Stream Data Message
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (7) |
| 1 | 2 | Message Length |
| 3 | n | Payload |
Streaming Session Start Message
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (8) |
| 1 | 2 | Message Length |
| 3 | 8 | Session ID |