DTC Protocol Discussion Forum
- DTC Protocol Discussion Forum |
- Search Board |
- Control Panel |
- View My Posts / Threads |
- Direct Messages
Date/Time: Fri, 29 Nov 2024 14:49:53 +0000
Post From: Same session multiple different HISTORICAL_PRICE_DATA_REQUEST
[2019-08-13 01:41:00] |
User972768 - Posts: 166 |
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 |