Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Tue, 02 Jun 2020 06:19:01 +0000


Same session multiple different HISTORICAL_PRICE_DATA_REQUEST

[2019-08-13 01:41:00]
User972768 - Posts: 156 | Ending Date: 2020-01-05 [Expired]
Hello,

I'm working on DTC client that needs access to multiple CL contracts. I can't to find anything in documentation explaining DTC protocol interaction for such case. My initial pseudo code looked like


connect() // open connection
login() // send ENCODING_REQUEST & LOGON_REQUEST

loop {
get_historical_data() // send HISTORICAL_PRICE_DATA_REQUEST for each CL contract with unique request_id (eg, CLF19, CLG19, ...)
}

disconnect() // close socket

This code gets 1st contract and then stalls. After some time DTC closes connection

The solution that works in my code is when I put connect(), login() and disconnect() calls inside the loop. Is this the way it is intended to be or I accidentally found workaround?

Thanks and best regards
[2019-08-25 06:19:13]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
The reason for the behavior that you see in Sierra Chart as documented here:
https://www.sierrachart.com/index.php?page=doc/DTCServer.php#HistoricalPriceDataServer

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

Login

Login Page - Create Account