I tried it with both dates and received data.? I didn't use the time, but not sure that should cause any issue.? When I ran it for the 6th, it shows up to and including 2024-11-05 close = 44.616
With the 7th it adds 2024-11-06 close = 10.639
Do you need to specify the time?
I also noticed that I was using rth=0, so Inswitched that and I now get close = 42.564 for the 6th.
Odd now I don't see the $10 price...
If I switch RTH = 0 then I see the $10 price but only on the 6th.
Why if there was a 1:4 split is it showing $42 prices again after?
toggle quoted message
Show quoted text
-------- Original message --------
From: "supis31 via groups.io" <supis31@...>
Date: 2024-11-12 10:23 a.m. (GMT-08:00)
Subject: [TWS API] 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 ?