wrighter / ib-scripts

Python scripts that use the Interactive Brokers TWS API
MIT License
48 stars 19 forks source link

Historical Data stops with message HMDS query returned no data #17

Closed wrighter closed 1 year ago

wrighter commented 1 year ago

Received from Alexander:

I am trying to get continuous ES (or NQ) with this command

python download_bars.py --security-type CONTFUT --start-date 20100101 --end-date 20230401 --exchange CME --size "4 hours" --max-days ES

but only getting about 1 month of data, followed by errors referring to the latest ESM3 contract. Using the latest TWS Build 10.22.1h, Apr 5, 2023 3:17:15 PM

I can see 'durationStr': '1 D' in the request, is that right?

22:28:35,83 ibapi.wrapper INFO ANSWER error {'reqId': 22, 'errorCode': 162, 'errorString': 'Historical Market Data Service error message:HMDS query returned no data: ESM3@CME Trades'} 22:28:35,85 ibapi.wrapper ERROR ERROR 22 162 Historical Market Data Service error message:HMDS query returned no data: ESM3@CME Trades 22:28:35,85 root ERROR Error. Id: 22 Code 162 Msg: Historical Market Data Service error message:HMDS query returned no data: ESM3@CME Trades

wrighter commented 1 year ago

I'm able to reproduce this issue. It looks like it stops at 2023-03-12, which is a Sunday. Not sure what's going on, but I do recall seeing this error message before.