Accessing GLOBEX Futures Market Depth through IB API

Discussion in 'App Development' started by IAS_LLC, Jan 21, 2014.

  1. IAS_LLC

    IAS_LLC

    Hello,

    I am trying to access GLOBEX futures market depth data through the Interactive Brokers TWS API (Linux and C++) and when I call the reqMktDepth() EClientSocket Function, I dont get anything back in return through the updateMktDepth() or through the updateMktDepthL2() functions (I know I shouldnt through the second one). I have tried getting data for the ES,6E, and M6E contracts. I AM able to get price quotes/size data for these contracts through the reqMktData() function.

    I admit I am still using the demo account on TWS and not the true "paper trading" account. Could this be causing my issue? My intention was to do as much of my trading platform development using the demo account so I didn't have to put money into IB until I was ready to do some final debugging and than start trading.

    I am able to to get Market Depth for stocks, but it doesn't seem to be working correctly....the "position" field in updateMktDepth always reads zero. Is this normal?

    Looking at this page: https://www.interactivebrokers.com/en/index.php?f=marketData&p=mdata I guess I don't actually see GLOBEX Mkt Depth (or Globex anything, for that matter) called out as an availabled data service. Does IB even offer GLOBEX futures Mkt Depth data? If it matters, I will be non-professional subscriber.

    In my testing I also found that I am only allowed to get MktDepth on 3 contracts at a time. Is there any way around this?

    Any help/insight would be greatly appreciated!!

    Thanks,
    Brad
     
  2. rwk

    rwk

    I didn't test it, but I am pretty sure there is no market depth data for the demo login. I have heard that market depth for the paper trader doesn't work either. Market depth works well for Globex and Project A, but I have not used it for stocks.

    You can get additional logins for something like $10 per month. You might consider bandwidth if you're considering more than three concurrent data streams. Each stream produces about 125,000 updates or more per second.
     
  3. IAS_LLC

    IAS_LLC

    Thanks for the info, I suspected it was a demo account issue
     
  4. squeeze

    squeeze

    Also looking at the L2 data API.
    I can see that the book update is handled via method calls and each one updates a level on one side of the book.
    If multiple levels change simultaneously then this is going to create multiple method calls where the book state is only complete once this sequence of calls has completed. So how do I know when the book build is complete? I can't see any way of telling using the information presented on the API.
     
  5. jeb9999

    jeb9999

    For working Java code that uses the IB market depth API take a look at JBookTrader

    http://code.google.com/p/jbooktrader/

    As I recall even the IB paper trading data does funny things with the Globex market depth. Only the live account Globex market depth data is reliable.


    Eugene Kononov (creator of JBookTrader) is the expert on the IB market depth API for Globex.
     
  6. 2rosy

    2rosy

    Project A? RUN FOR IT MARTY