¿ªÔÆÌåÓýMy downloader works rather differently, in that it uses a lot of asynchrony to get the data as fast as possible. ? I¡¯ve just run it for daily S&P500 bars from 01/01/2005 to 01/0/2015. It went through the whole list, taking 66 minutes in total. ? It doesn¡¯t do anything differently for older data. For each symbol (read from stdin) it does a contract details request (just to make sure the symbol is valid: my S&P500 list is a bit out of date, with about 30 or so incorrect symbols so far), followed by a historical data request, and then writes the returned data out to a text file. Multiple contract details requests and historical data requests are made concurrently, up to 20 of them for the contracts. As each contract request completes, the corresponding historical data request is added to a queue and the next contract request is made. As each data request completes, the next one in the queue is fired. ? So it appears that TWS itself doesn¡¯t prevent old data downloads running smoothly. ? I don¡¯t know what to suggest regarding your issue, though it does look like it¡¯s likely to be a fault in your code. The fact that it hangs after 98 API requests looks very suspicious. But then why wouldn¡¯t it do the same with more recent data?... ? Using single requests for 20 years should work fine, but if you¡¯re anything like me you¡¯ll probably want to track down the cause of the problem. ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of David Armour
Sent: 21 February 2023 02:06 To: [email protected] Subject: [TWS API] Historical Data Download : Compare Experiences ? I, like many of you I am sure, have created a data downloader. I came across a problem recently with my code which has been running well for ages (years). The difference this time is I am trying to download quite old data. Let me explain. |