Most recent timestamp on Historical API

Santosh
Hi,

My query is regarding syncing data fetched with historic API to the data fetched with websocket calls. Assume timescale is in minutes.

Case 1: If I fetch historic data lets say from 04-05-2017 to 05-05-2017 and at the time of sending get request time is lets say 11:00AM and I receive reply by 11:00:03AM and lets say in those elapsed 3 seconds 5000 trades have happened. What will I get in Historic API call?

Case 2: Lets say the user's net connection is slow....and he gets a reply by 11:00:30...what happens in that case?

Case 3: Lets say I fetched data from historic data till 11:02 and created candles till 11:02. Next candle is being created and displayed with websocket thereafter. How can it be ensured that I receive correct open price for this dynamic candle as I am using websocket calls to update it?
  • sujith
    Hi @Santosh,
    A minute candle is constructed only after that minute is complete. If you request for the 1-minute candle at 11:01 AM then you will get candle until previous minute i.e. till 11:00 AM.

    Source for historical data is different from websockets, it will be near but can never match. For more information check out this thread.
  • Santosh
    Hi @sujith, Thanks for providing the discussion thread.

    At one point it is mentioned there that:
    "Its unlikely that these service providers can record each price level the stock has been to at one particular interval unless they've subscribed to the Exchange's tick by tick data.".

    Does historic API use tick by tick data. to create and store candles? Does websocket provides tick by tick data? If not what is the latency of websocket data?
  • Santosh
    Nitin has written that Pi would be based on snapshot data, so the 1 minute OHLC will be based on those 4 to 5 ticks we get in a second. That was way back in 2014. Is it same today?

    In that case websocket data would also be inaccurate and in turn market depth cannot be trusted with any degree of confidence?
  • sujith
    sujith edited May 2017
    @Santosh,
    Getting (TBT)tick by tick data in India with current infrastructure is not possible. There could be lakhs of ticks per second.
    To get TBT, your server needs to be in exchange colocation. Infrastructure + colo server setup will cost around 18 lakhs per annum. It is the base package, for premium add-ons, the price may increase. If you are interested please send a mail to talk(at)rainmatter.com.

    If you want colo-setup, you can't use KiteConnect. Thomson Reuters has APIs for it, you can use it.
    I don't think any vendor in India will provide TBT data also.

    Both Historical data and Kite Ticker don't have TBT data as they are not exchange colo-setup.
    With Kite ticker, you can expect up to one tick per second based on the liquidity of the scrip.
  • Santosh
    @sujith, thanks. This is good information.
This discussion has been closed.