Skip to main content

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​

OffsetLengthDescription
01Message Type
12Message Length

Login Request​

OffsetLengthDescription
01Message Type (1)
12Message Length
3nLogin Token

Login Request Accepted​

OffsetLengthDescription
01Message Type (2)
12Message Length

Login Request Rejected​

OffsetLengthDescription
01Message Type (3)
12Message Length
31Rejected Reason

Rejected Reason Values​

Ascii ValueLength
'T'Bad Token
'A'Authentication Failure

Snapshot Header​

Indicates the start of a snapshot stream.

OffsetLengthDescription
01Message Type (4)
12Message Length

Snapshot Data Message​

OffsetLengthDescription
01Message Type (5)
12Message Length
3nPayload

Indicates the end of a snapshot stream.

OffsetLengthDescription
01Message Type (6)
12Message Length

Stream Data Message​

OffsetLengthDescription
01Message Type (7)
12Message Length
3nPayload

Streaming Session Start Message​

OffsetLengthDescription
01Message Type (8)
12Message Length
38Session ID