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. 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.
Wow thanks for posting this! I have been learning Python and messing around with Alpaca's API but I want to keep all my future live trading with IB. I will definitely be looking into this.
I find out you share a lot in internet community and thanks for your contribution. Recently I finish reading a new book about Japanese trader CIS. He wrote the book and talked about how he earned over 1 billions US dollars from almost zero with aggressive trend following style. He doesnt disclose his face and never try to earn from marketing or whatever. I think normal human can only try to copy his style with automated system since the daily psychology part is too hard to overcome.
Here is the Chinese version: https://www.books.com.tw/products/0010841394 The original version was written in Japanese. I guess there isnt English version.