开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

downlod historical SH data, Proshares Short S&P 500, before the split


 

Hi,
?
When I'm trying to download the close prices with endDate 2024-11-07 everything is fine:
?
? ? ticker = "SH"
? ? contract = Stock(ticker, 'SMART', 'USD', primaryExchange = 'ARCA')
? ? bars = ib.reqHistoricalData(contract, endDateTime='20241107 15:59:00 US/Eastern', durationStr='3 Y',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? barSizeSetting='1 day',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? whatToShow='TRADES',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? useRTH=True)
?
But when I change the date to 2024-11-06 i get this:

Error 162, reqId 24: Historical Market Data Service error message:Unknown contract, contract: Stock(symbol='SH', exchange='SMART', primaryExchange='ARCA', currency='USD')
?
It must have something to do with the recent reverse split ?

Join [email protected] to automatically receive all group messages.