Binary Market Data (TCP) Snapshot
This section describes the implementation and protocol of the TCP Snapshot functionality present in the Binary Market
Data Gateway.
Once a Snapshot has been received from a client the Binary Market Data Gateway will then perform a disconnect.
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 |
Snapshot Request
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (1) |
| 1 | 2 | Message Length |
| 3 | n | Login Token |
Snapshot Request Accepted
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (2) |
| 1 | 2 | Message Length |
Snapshot 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 |
Snapshot Session Start Message
| Offset | Length | Description |
|---|
| 0 | 1 | Message Type (8) |
| 1 | 2 | Message Length |
| 3 | 8 | Session ID |