Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 12:34:53 +0000



[Programming Help] - DTC Submit Market Order

View Count: 463

[2023-05-16 23:55:13]
fcpauldiaz - Posts: 18
I'm trying to send a market order via DTC server

1. enabled authentication
2. enabled allow trading
3. connection is successful
{
"BracketOrdersSupported": 1,
"HistoricalPriceDataSupported": 0,
"Integer_1": 0,
"MarketDataSupported": 1,
"MarketDepthIsSupported": 1,
"MarketDepthUpdatesBestBidAndAsk": 0,
"OCOOrdersSupported": 1,
"OneHistoricalPriceDataRequestPerConnection": 0,
"OrderCancelReplaceSupported": 1,
"ProtocolVersion": 8,
"ReconnectAddress": "",
"ResubscribeWhenMarketDataFeedAvailable": 0,
"Result": 1,
"ResultText": "Connected to SC DTC Protocol server. Service=sc_futures_direct.dtc.trading|SymbolSettings=sc_futures_direct.dtc.trading",
"SecurityDefinitionsSupported": 1,
"ServerName": "SC DTC Server. Build=45800",
"SymbolExchangeDelimiter": "",
"TradingIsSupported": 1,
"Type": 2,
"UsesMultiplePositionsPerSymbolAndTradeAccount": 0
}

4. SubmitNewSingleOrder body

{
"BuySell": 1,
"ClientOrderID": 1,
"Exchange": "CME",
"IsAutomatedOrder": 1,
"IsParentOrder": 0,
"MaxShowQuantity": 1,
"OpenOrClose": 1,
"OrderType": 1,
"Quantity": 1,
"Symbol": "MESM23_FUT_CME",
"TimeInForce": 1,
"TradeAccount": "Sim1",
"Type": 208
}

Am I missing something ? I tried using Live trading and Simulated trading. I don't get any errors on the window log.
[2023-05-18 13:38:39]
Sierra_Chart Engineering - Posts: 17191
When you submit an order, you will definitely get this DTC message:
const uint16_t ORDER_UPDATE = 301;
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-05-18 22:00:37]
fcpauldiaz - Posts: 18
unfortunately, I'm not getting the ORDER UPDATE (301) after submitting an order (208). If I send OPEN ORDERS REQUEST (300) I do get a 301 like this:

{
"BuySell": 0,
"ClientOrderID": "",
"Exchange": "",
"ExchangeOrderID": "",
"FreeFormText": "",
"GoodTillDateTime": 0,
"InfoText": "",
"LastFillDateTime": 0,
"LastFillExecutionID": "",
"LatestTransactionDateTime": 0,
"MessageNumber": 1,
"NoOrders": 1,
"OCOLinkedOrderServerOrderID": "",
"OpenOrClose": 0,
"OrderReceivedDateTime": 0,
"OrderStatus": 0,
"OrderType": 0,
"OrderUpdateReason": 1,
"ParentServerOrderID": "",
"PreviousClientOrderID": "",
"RequestID": 2,
"ServerOrderID": "",
"Symbol": "",
"TimeInForce": 0,
"TotalNumMessages": 1,
"TradeAccount": "",
"Type": 301
}

UPDATE/EDIT:

If i remove params from the sumbit order body I do get a 301 with the error.

Example:

{
"OpenOrClose": 1,
"Symbol": "MESM23_FUT_CME",
"TradeAccount": "7PV0862",
"Type": 208
}

I receive

{
"BuySell": 0,
"ClientOrderID": "9770",
"Exchange": "",
"ExchangeOrderID": "",
"FreeFormText": "",
"GoodTillDateTime": 0,
"InfoText": "OrderType field is not set",
"LastFillDateTime": 0,
"LastFillExecutionID": "",
"LatestTransactionDateTime": 0,
"MessageNumber": 1,
"NoOrders": 0,
"OCOLinkedOrderServerOrderID": "",
"OpenOrClose": 0,
"OrderReceivedDateTime": 0,
"OrderStatus": 9,
"OrderType": 0,
"OrderUpdateReason": 8,
"ParentServerOrderID": "",
"PreviousClientOrderID": "",
"RequestID": 0,
"ServerOrderID": "",
"Symbol": "MESM23_FUT_CME",
"TimeInForce": 0,
"TotalNumMessages": 1,
"TradeAccount": "7PV0862",
"Type": 301
}

when I add the order type, it stops receiving the order update (301)

Also the heartbeat shows 0 dropped messages.

{
"CurrentDateTime": 1684627983,
"NumDroppedMessages": 0,
"Type": 3
}
Date Time Of Last Edit: 2023-05-21 00:15:04
[2023-05-22 13:36:52]
Sierra_Chart Engineering - Posts: 17191
There really could not be any problem on the Sierra Chart side regarding this. We do not know what is going on in your particular case. What is the method of encoding that you are using?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-05-22 13:50:15]
fcpauldiaz - Posts: 18
JSON encoding
[2023-08-09 18:16:08]
AndrewAMD1 - Posts: 31
"ClientOrderID": "",
Isn't ClientOrderID a required field?

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account