Login Page - Create Account

Sierra Chart Custom


[JSON only] HISTORICAL_TRADES_REQUEST [s_HistoricalTradesRequest structure] Client >> Server

This is a message from the Client to the Server to request trades for a given symbol and trade account. A trade consists of an opening trade order fill and a closing trade order fill which constitute a single trade.

A trade can be long or short.

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

Value: 10100.

[int32] RequestID

A unique request identifier. The Server will return the same identifier in the HISTORICAL_TRADES_RESPONSE response.

[char] Symbol

Leave empty if want all trades for all symbols for the specified TradeAccount. Otherwise, request trades for given Symbol identifier.

[char] TradeAccount

This specifies the particular Trade Account to request trades for.

[t_DateTime] StartDateTime

The StartDateTime field specifies to the Server to return trades starting with the date-time specified.

[JSON only] HISTORICAL_TRADES_RESPONSE [s_HistoricalTradesResponse structure] Server >> Client

This is a message from the Server to the Client providing an individual trade in response to a HISTORICAL_TRADES_REQUEST message.

The Server is expected to send this message to the Client in response to a HISTORICAL_TRADES_REQUEST message even when there are no trades to return.

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

Value: 10102.

[int32] RequestID

The RequestID specified in the HISTORICAL_TRADES_REQUEST message from the Client.

[char] Symbol

The symbol the trade is for.

[char] TradeAccount

This is the trade account that the trade associated with.

[t_DateTime] EntryDateTime

This is the Date and Time of the trade entry.

[t_DateTime] ExitDateTime

This is the Date and Time of the trade exit.

[double] EntryPrice

This is the price of the trade entry.

[double] ExitPrice

This is the price of the trade entry.

[BuySellEnum] TradeType

The side for the entry fill. Either Buy or Sell.

[double] EntryQuantity

This is the quantity of the trade entry.

[double] ExitQuantity

This is the quantity of the trade exit.

[double] MaxOpenQuantity

This is the maximum quantity of the trade.

[double] ClosedProfitLoss

This is the profit/loss for the trade.

[double] MaximumOpenPositionLoss

This is the maximum loss during the life of the trade.

[double] MaximumOpenPositionProfit

This is the maximum profit during the life of the trade.

[double] Commission

This is the commission for the trade.

[JSON only] HISTORICAL_TRADES_REJECT [s_HistoricalTradesReject structure] Server >> Client

If the Server is unable to serve the request for a HISTORICAL_TRADES_REQUEST message received, for a reason other than there not being any historical trades, then send this message to the Client.

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

Value: 10101.

[int32] RequestID

This is set to the RequestID field sent in the HISTORICAL_TRADES_REQUEST message.

[char] RejectText

Free-form text indicating the reason for rejection.

[JSON only] SUBMIT_NEW_2_LEG_SPREAD_ORDER [s_SubmitNew2LegSpreadOrder structure] Client >> Server

Field Name Field Description
[unsigned int16] Type

The standard message type field. Automatically set by constructor.

Value: 10103.

Symbol_1

Exchange_1

ClientOrderID_1

OrderType_1

BuySell_1

Price1_1

Price2_1

Quantity_1

Symbol_2

Exchange_2

ClientOrderID_2

OrderType_2

BuySell_2

Price1_2

Price2_2

Quantity_2

TimeInForce

GoodTillDateTime

TradeAccount

IsAutomatedOrder

FreeFormText

PresetMarginRequirement

The total margin requirement for both legs of the spread order.


*Last modified Tuesday, 13th August, 2019.