Yes there is. If you define a futures instrument without specifying an expiry date then you will get a list of all contracts which fit your description.Is there a way to use the API to find out the list of all available months for a futures ticker?
For example, for ZN, is there a way to return the list of 201906,201909,201912.... ?
Example: if you specify a contract by only the symbol (ZN), the security type (FUT), the exchange (ECBOT) and the currency (USD) and then use reqContractDetails(contract) you will get all futures contracts which match this incomplete contract specification. This information is sent by IB to the method contractDetails() which you need to override for your purposes.