Relay Server

Introduction

Sierra Chart provides a Relay Server, which relays all of the market data that is received from the connected Data or Trading services. This is a TCP/IP socket based server.

The only data relayed is the streaming real-time data. Historical data is not relayed.

By default the data uses the DTC Binary Encoding data structure format. Refer to the /DTC/DTCProtocol.h header file in the folder that Sierra Chart is installed to for these data structures.

Only the data for the symbols that Sierra Chart is currently tracking based upon symbols used in Quote Boards, Charts, Trade DOMs, and symbols listed in the Global Settings >> Intraday File Update List, will be relayed.

The protocol does not support a Relay Server Client making market data requests.

Market depth data is only relayed if it is supported by the connected Data or Trading service and if Sierra Chart has subscribed to that data for a particular symbol. Sierra Chart will only subscribe to market depth data, if it is used by market depth features currently active for a particular symbol.

It is possible to cause market depth data to be subscribed for a symbol if you have appended |MDD to the symbol in the Global Settings >> Intraday File Update List.

Usage

Follow the instructions below to use the Sierra Chart Relay Server.

  1. Select Global Settings >> Data/Trade Service Settings .
  2. Press the SC Server Settings button.
  3. Enable DTC Protocol Server >> Enable DTC Protocol Server option.
  4. In the Listening Port box, specify the port number for the server to listen on.
  5. Establish a TCP/IP network connection to 127.0.0.1 using the specified port number.
  6. Send a LOGON_REQUEST message with the LOGON_REQUEST::Integer_1 field set to 2. This causes the second bit of the integer to be true. It is this message with this flag which puts the DTC Protocol Server connection into Relay Server mode.
  7. Once connected it is necessary to send a DTC::HEARTBEAT message at the interval according to the LOGON_REQUEST::HeartbeatIntervalInSeconds field you have set. Otherwise, the connection will be closed after a short period of time by Sierra Chart.
  8. The program you write which uses the Relay Server needs to support DTC Binary Encoding messages (data structures).
  9. Multiple connections to the DTC Protocol server are supported.
  10. After logging on, other than sending a DTC::HEARTBEAT message, there are no messages that a client program connected to the server will need to send.
  11. The below messages are sent from the Relay Server.

Supported Messages

The following are descriptions for the supported messages. For complete documentation for these messages, refer to DTC Messages and Procedures.

DTC::SECURITY_DEFINITION_RESPONSE

When connected to and after logging on to the Relay Server, and data is available for a particular symbol, then this message will be sent to the Client for each symbol available.

When connected to the Relay Server and data for a symbol becomes available, at that time this message will be sent for that symbol.

This message is used to identify what Symbol a particular SymbolID is associated within the MARKET_DATA_* and MARKET_DEPTH* messages.

The relevant fields set in this message are as follows: RequestID (equivalent to SymbolID), Symbol, Exchange.

DTC::MARKET_DATA_UPDATE_TRADE_COMPACT

Refer to MARKET_DATA_UPDATE_TRADE_COMPACT.

DTC::MARKET_DATA_UPDATE_BID_ASK_COMPACT

Refer to MARKET_DATA_UPDATE_BID_ASK_COMPACT.

DTC::MARKET_DATA_UPDATE_DAILY_SETTLEMENT

Refer to MARKET_DATA_UPDATE_DAILY_SETTLEMENT.

DTC::MARKET_DATA_UPDATE_DAILY_HIGH

Refer to MARKET_DATA_UPDATE_DAILY_HIGH.

DTC::MARKET_DATA_UPDATE_DAILY_LOW

Refer to MARKET_DATA_UPDATE_DAILY_LOW.

DTC::MARKET_DATA_UPDATE_DAILY_OPEN

Refer to MARKET_DATA_UPDATE_DAILY_OPEN.

DTC::MARKET_DATA_UPDATE_DAILY_VOLUME

Refer to MARKET_DATA_UPDATE_DAILY_VOLUME.

DTC::MARKET_DATA_FEED_STATUS

Refer to MARKET_DATA_FEED_STATUS.

DTC::MARKET_DATA_SNAPSHOT

Refer to MARKET_DATA_SNAPSHOT.

DTC::MARKET_DEPTH_SNAPSHOT_LEVEL

Refer to MARKET_DEPTH_SNAPSHOT_LEVEL.

DTC::MARKET_DEPTH_UPDATE_LEVEL_COMPACT

Refer to MARKET_DEPTH_UPDATE_LEVEL_COMPACT.

DTC::HEARTBEAT

Refer to HEARTBEAT.


*Last modified Friday, 12th August, 2016.