Currently when searching for a contract using IB as the provider the results only show the contracts which are still currently active. I would like to also retrieve the contracts which have expired.
To add this functionality through IB API you would set the IncludeExpirted property of the contract when calling reqContractDetails(id, contract) as documented:
https://interactivebrokers.github.io/tw ... tract.htmlbool IncludeExpired [get, set]
If set to true,
contract details requests and historical data queries can be performed pertaining to expired futures contracts. Expired options or other instrument types are not available.
Could the OpenQuant team please add IncludeExpired under Settings - Instrument, as an IBTWS propery.
Thanks