Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 14:45:51 +0000



DTC Low latency routing needs more precise timestamps

View Count: 529

[2023-01-27 01:03:30]
User5044343 - Posts: 68
(2) Two items. Pretty please.

OrderReceivedDateTime doesn't have any more detail than "seconds"
LatestTransactionDateTime only goes to 1 millisecond.

If possible please increase granularity on LatestTransactionDateTime and have OrderReceivedDateTime match it.

Right now OrderReceivedDateTime rounds up and shows up that a message was received in the future. Example below:


2023-01-27 00:52:02 1674780722.8678 Received: {"Type":301,"RequestID":0,"TotalNumMessages":1,"MessageNumber":1,"OrderStatus":2,"OrderUpdateReason":2,"OrderType":4,"BuySell":1,
"Price1":407400,"Price2":407500,"TimeInForce":0,"GoodTillDateTime":0,"OrderQuantity":1,"FilledQuantity":0,"RemainingQuantity":1,"AverageFillPrice":0,"LastFillPrice":0,
"LastFillDateTime":0,"LastFillQuantity":0,"NoOrders":0,"Symbol":"MESH23_FUT_CME","Exchange":"","ServerOrderID":"","ClientOrderID":"4","ExchangeOrderID":"",
"LastFillExecutionID":"","TradeAccount":"","InfoText":"Order from DTC client #323. execute. 1xxxxx2","ParentServerOrderID":"","OCOLinkedOrderServerOrderID":"","OpenOrClose":0,"PreviousClientOrderID":"","FreeFormText":"","OrderReceivedDateTime":1674780723,
"LatestTransactionDateTime":1674780722.863,"Username":""}

2023-01-27 00:52:02 1674780722.8717 Received: {"Type":301,"RequestID":0,"TotalNumMessages":1,"MessageNumber":1,"OrderStatus":2,"OrderUpdateReason":3,"OrderType":4,"BuySell":1,
"Price1":407400,"Price2":407500,"TimeInForce":1,"GoodTillDateTime":0,"OrderQuantity":1,"FilledQuantity":0,"RemainingQuantity":1,"AverageFillPrice":0,"LastFillPrice":0,
"LastFillDateTime":0,"LastFillQuantity":0,"NoOrders":0,"Symbol":"MESH23_FUT_CME","Exchange":"","ServerOrderID":"1054779","ClientOrderID":"4","ExchangeOrderID":"1384025",
"LastFillExecutionID":"","TradeAccount":"","InfoText":"Teton CME Order Routing (New). Info: Order from DTC client #15. Sierra Chart. 6xxxxxxxxx7","ParentServerOrderID":"","OCOLinkedOrderServerOrderID":"","OpenOrClose":0,"PreviousClientOrderID":"","FreeFormText":"","OrderReceivedDateTime":1674780723,
"LatestTransactionDateTime":1674780722.867,"Username":""}


I'm trying to replicate your speed execution as posted in Teton Order Routing Order Latency Clocked at 250 µs! but I can't replicate/verify/match your findings.
Date Time Of Last Edit: 2023-01-27 01:05:31
[2023-01-28 03:33:36]
Sierra_Chart Engineering - Posts: 17228
For millisecond precision when logging on to the DTC server, set Integer1 to this:
const unsigned int DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_MILLISECOND_TIMESTAMPS_FOR_ORDERS = 0x20000;

You need to OR this with anything else that variable is set to.

Not sure we can go to microseconds.
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-01-28 17:12:07]
User5044343 - Posts: 68
1. Where can I find the documentation for DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_MILLISECOND_TIMESTAMPS_FOR_ORDERS or other params that can be set in Interger_1 in LOGON_REQUEST?


2. I'm assuming that if LOGON_RESPONSE comes back with Integer_1 as 0 it means I passed the parameter wrong?

LOGON_REQUEST:

{"Type":1,"HeartbeatIntervalInSeconds":0.1,"TradeMode":1,"Username": "xxx", "Password": "xxx","ClientName":"execute", "Integer_1": 131072}

LOGON_RESPONSE:
(
[Type] => 2
[ProtocolVersion] => 8
[Result] => 1
[Integer_1] => 0
[MarketDepthUpdatesBestBidAndAsk] => 0
[TradingIsSupported] => 1
[OCOOrdersSupported] => 1
[OrderCancelReplaceSupported] => 1
[SecurityDefinitionsSupported] => 1
[HistoricalPriceDataSupported] => 0
[ResubscribeWhenMarketDataFeedAvailable] => 0
[MarketDepthIsSupported] => 1
[OneHistoricalPriceDataRequestPerConnection] => 0
[BracketOrdersSupported] => 1
[UsesMultiplePositionsPerSymbolAndTradeAccount] => 0
[MarketDataSupported] => 1
[ResultText] => Connected to SC DTC Protocol server. Service=sc_futures_direct.dtc.trading|SymbolSettings=sc_futures_direct.dtc.trading
[ReconnectAddress] =>
[ServerName] => SC DTC Server. Build=44325M
[SymbolExchangeDelimiter] =>
)
[2023-01-29 23:56:51]
Sierra_Chart Engineering - Posts: 17228
1. This is not documented.

2. No, that is a different field.
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-01-30 04:17:15]
User5044343 - Posts: 68
I'm sending this:

{"Type":1,"HeartbeatIntervalInSeconds":0.1,"TradeMode":1,"Username": "xxx", "Password": "xxx","ClientName":"execute", "Integer1": 131072, "Integer_1": 131072}

But now I get this:

[OrderReceivedDateTime] => 1675051917021
[LatestTransactionDateTime] => 1675051917.051
Is it a bug that OrderReceivedDateTime is x100 format over LatestTransactionDateTime ? (OrderReceivedDateTime/100 would show it in the same format)

I can work around this by converting but was curious.
Date Time Of Last Edit: 2023-01-30 04:17:47
[2023-02-01 05:00:20]
User5044343 - Posts: 68
I started logging timestamps ( provided by sierra via DTC - so not system timestamps ) for OrderReceivedDateTime and when the OrderStatus gets switched to ORDER_STATUS_OPEN.

Its about 3-4ms. Done around 11pm CST for ES and MES. I posted ServerOrderIDs in case you want to look it up.

ServerOrderID  OrderReceivedDateTime  OrderAcceptedDateTime
1056597  1675226892.024  1675226892.028
1056598  1675226957.106  1675226957.109
1056599  1675227253.385  1675227253.389
1056600  1675227258.06  1675227258.064
1056601  1675227261.603  1675227261.607
1056602  1675227264.579  1675227264.583

According to this post you got 1/4 of a millisecond but the data is showing 3-4 milliseconds. Are we measuring the same thing?

Teton Order Routing Order Latency Clocked at 250 µs!
[2023-02-04 01:48:14]
User5044343 - Posts: 68
I have some stats from today - running on Teton, 292 orders, average 0.0148 seconds. So about 15 milliseconds from placement to confirmation.

Many of them at 4ms.

It seems that about 3ms of that is roundtrip between 350 Cermak (where my Sierra runs) and 208.x.x.129

The other higher amounts could be due to the load on my machine - I haven't done enough to monitor for system usage when these higher times occurred.

Either way - its good enough for me at the moment. Its solid, stable with websockets for streaming my orders. Thanks Sierra!

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

Login

Login Page - Create Account