ticker for Index future contract in IB

Discussion in 'Interactive Brokers' started by Sky123987, Nov 26, 2007.

  1. I'm trying to access the dow futures in IB via the API. What is the ticker writing it by the month. Like what is the ticker for Dow futures dec 2007 or dow futures mar 2008??

    THanks
     
  2. Gustaf

    Gustaf

    Here you go my friend, code supplied by codegod! :D

    --------- Set these fields --------

    contract.symbol = "ES" // or "YM"
    contract.secType = "FUT"
    contract.expiry = "20071220"
    contract.exchange = "GLOBEX"
    contract.primaryExchange = "GLOBEX"
    contract.currency="USD"

    ------------------------------------------

    You can also query expiry="200712" and get multiple values (at least with option chains, havent tried futures).

    Feel free to PM me if you need more help. :cool:

    Br Gustaf