Timestamp for reqMktData, reqMktDepth in IB API

Discussion in 'Data Sets and Feeds' started by rokka, Apr 20, 2011.

  1. rokka



    Does anybody know if it is possible to get timestamps on market data streaming through IB API? Or this is not supposed to be provided at all?

    How do you guys measure the events time then in this API?

  2. Krass


    Hi. I am very new to the IB API.

    When requesting market data with the API, I noticed that a timestamp will be echoed on each data movement.

    example from my project:
    id=5 lastTimestamp=1303329585

    Not too sure yet how to handle this timestamp info, but I bet it's rather simple.

    So to answer your question, yes, IB provides timestamps.
  3. rokka


    Right, this is it.
    Does it mean that the 1 sec is the best precision IB can provide? That's even not funny.

    New Ticktype "Last Timestamp," (TickType.LAST_TIMESTAMP)

    This tick represents "timestamp of the last Last tick" value in seconds (counted from 00:00:00 1 Jan 1970 GMT). Value will be sent back by TWS (starting 872 release) in a response to regular market data subscription as long as client version is 32 or above (API 9.2).
  4. I too have recently begun to look at the IB API. I don't think this market data should be used for anything except as some kind of reference price for putting in orders. The data is sampled and aggregated in such a manner that it's difficult to construct signals that are appropriate for more aggressive strategies.

    I'd break your app up into a market data consumer from some other source, and then use IB as strictly an order placement system. Don't tie yourself into their API so closely you screw yourself in the end.
  5. rokka


    Good points.
    IB is just not designed for anything heavy.

    It might still be useful for orders submitting especially taking into account that fix proto available for this.

  6. rosy2


    IB's data is snapshots