David, Why IB returns only 42 historical bars on your request - that depends. It might be one of the cases: ? - you only asked for that much, so they deliver ? - you've reached end of available historical data for given bar size ? - your app is crashing somewhere along the way and didn't have a chance to process the rest What are the "bar size" and "duration" values you use for reqHistoricalData() request? There is a table of the max possible duration values for different bar sizes that IB would allow for your request in this question:? IB API never left my reqHistoricalData hanging or unanswered. The call to?reqHistoricalData() will lead to the?resulting bars returned in form of?int reqId, Bar bar callbacks. The very last callback from IB will deliver Bar object with time string which?starts with "finished", which will trigger ??callback.? Basically you need to implement 2 EWrapper methods: ? 1) historicalData() - to get next bar and store it somehow ? 2)?historicalDataEnd() - to consider request complete / done Well and of cause "3)" for the error case when IB server response to your?reqHistoricalData() request: error number 162 with text "HMDS query returned no data", which would mean there's no point to try to dig any deeper in time. Also note: you can use the reqHeadTimeStamp method to find the timestamp for the earliest data available for the contract. Cheers, Dmitry Shevkoplyas On Wed, Jan 13, 2021 at 2:55 PM <david03kimo@...> wrote: Hi,Dmitry, |