IB API C++ programming

Discussion in 'App Development' started by marsman, Jul 14, 2016.

  1. marsman

    marsman

    Anybody else doing programming with the latest IB API version 9.72 in C++ on Linux (ie. POSIX) as console application?

    I want to use it for equity options with these main tasks:
    - get account data
    - get current data of the underlying (ie. Level-1 data: Bid, BidSize, Ask, AskSize, Last, Volume)
    - get the data to all strikes for a specified expiration date (ie. Level-1 data: Bid, BidSize, Ask, AskSize, Last, Volume)
    - (analysis)
    - submit order and monitor its status
    - modify order
    - cancel order
    - keep a log of all important actions
    - ...

    I'm using the g++ compiler.

    Does it make sense to work with streaming data or should I first start with just periodic snapshot data, for example every 15 or 30 seconds?

    .
     
    Last edited: Jul 14, 2016
  2. Snapshot data is limited to 100 tickers. Just use non-snapshot data and maintain the latest values in a data structure that updated by the tick callbacks.
     
  3. marsman

    marsman

    Yes, makes sense for the underlying. Thx.

    But how do I do it with the many option strikes (for example 60 call strikes and 60 put strikes)?
    I need to analyse all strikes of an expiration date. Do I need to subscribe each strike individually?
     
    Last edited: Jul 14, 2016
  4. conduit

    conduit

    I use a C# implementation. No point in doing C++ for latency purposes as real time data is disseminated in 200-300ms latency bursts.

    But you may on the other hand still use C++ given, as you indicated, you want to use it in Linux.

     
  5. conduit

    conduit

    I have not subscribed to IB options data but I recommend, if you can, to only subscribe to the top of the book bid and offer prices for the options across all strikes. Not sure how the data throttling works on options data, though.

    With those prices you can then easily back out implied volatility that you can compare to your modeled volatility in case you are interested in running analytics or like to evaluate your volatility model.

     
    Last edited: Jul 14, 2016
  6. marsman

    marsman

    It's not really of latency or so. The reason is simply that I know only C++ and can't/won't switch to any other language or OS. I also don't need any GUI. This has also to do with my plan to later let the code run on a rented remote fast internet server (via the IB Gateway interface).
     
    Last edited: Jul 14, 2016
  7. conduit

    conduit

    Then that seems a natural choice ;-)

     
  8. marsman

    marsman

    Yes, that is indeed my plan. I need to act like a MM :), for this I indeed need to do such analysises. Btw, I'm non-professional trader, ie. just a retail at the moment.
     
    Last edited: Jul 14, 2016
  9. marsman

    marsman

  10. marsman

    marsman

    On this page http://interactivebrokers.github.io...Client.html#a5b7d2f3048b2be5c9c3a87c18fb01dd3
    the reqMktData() method is described, but unfortunately what the last parameter (mktDataOptions) is supposed to have is not described :-(

    void reqMktData(int tickerId,
    Contract contract,
    string genericTickList,
    bool snapshot,
    List< TagValue > mktDataOptions
    )

    OTOH the genericTickList values are IMO very useful (HV, IV, RT HV etc. besides many other values like Volume etc.)
     
    #10     Jul 14, 2016