Expired Futures

View as MarkdownOpen in Claude

While they can not be traded, TWS API users can refer to expired Futures contracts by including the “IncludeExpired” field. This will permit users to review historical market data for contracts that have expired within the last 2 years. This functionality is not supported in the web api.

symbol = "ES"
secType = "FUT"
exchange = "CME"
currency = "USD"
lastTradeDateOrContractMonth = "202309"
IncludeExpired= True