Interactive Broker's API close question

Discussion in 'Automated Trading' started by nitro, Apr 4, 2007.

  1. nitro



    Please tell me if I am wrong. Using Interactive Broker's API, depending on what exchange you use to subscribe to realtime data on an equity, the previous day "close" will change depending on what exchange you used to subscribe to data. So if you subscribe to IBM quotes using "SMART" you could potentially get a different close than if you subscribe to IBM from the NYSE. That blows if only for the reason that your calculation of what the gain or loss on the stock for the day is off [won't match other feeds or even TWS itself]

    Is there a way to get the "official" close [NYSE close for NYSE stocks, and NAZ close otherwise, or maybe just the 3:00 PM CST close for everything] for an equity without worrying about what exchange you get your data from, i.e. "SMART"?

    I notice that on TWS, even though I subscribe to SMART for a stock, it still gets the close correctly. What is the right way to do this in the API?


  2. makcim


    The API gets all the info from TWS. If you are able to see the correct close using TWS, then you will see it through the API
  3. Bob111


    make sure,when you request market data from TWS via API , you specify currency in "USD". if you leave it blank or put some other currency(let say euro)-TWs may assume you requesting data for IBM traded in European exchange.
    as for closing price-i usually get it from at least 2 different sources and then run crossover query. IB closing price may not be accurate sometimes.
  4. nitro


    Thanks for the tips.