Hi, I try to get the expiration price of an option (let's say SPY) expired 2 months ago.
I tried to get the Close of the last trading day using reqHistoricalData:
IContract.exchange="SMART"
IContract.conId=458962807?????? //SPY 2021-01-22 Call 386
IContract.includeExpired=true
IBClient.ClientSocket.reqHistoricalData(1,IContract,"20210125 02:00:00 CET","1 W","1 day","TRADES",0,1,0,Null)
But I get an error 200 No security definition has been found for the request
Which sounds logical, according to the historical data limitations:
unavailable historical data: Expired options, FOPs, warrants and structured products
So, does anyone knows how to get the last price of an expired option (the expiration price kept for assignment calculations by OCC and IB) via API (and not FLEX queries)?