1 minute / 5 minute / 15 minute / 30 minute / 1 hour candle data creation

tahseen
If there are many people interested in generating candles stick data from web socket ticks, I am willing to share the architecture and code, which instantly generates candle files on completion of the candle time. So it is like instant

I can give a session on the architecture, what tech stack to be deployed and the code
  • ashwin_tay
    :hand-raise:
  • Tusar369
    It's a good initiative to do Multi Time Frame Analysis. Looking forward for the same discussion.
  • tahseen
    Ok, I will wait for more number of people
  • srinidhihebbar
    Can you please post the time it outuput , just to compare ?
  • tahseen
    @srinidhihebbar

    Let us say we are talking about 1 minute candle then less than half a second after the time candle time finishes

    Let us say time is HH:MM:SS:mmm, where mmm is milli second

    So a 10:15:00:000 candles finishes at 10:16:00:000 and you get the data by like 10:16:00:0100

    which is like 100 milli second. And this is pure Python code. This can be brought down to like 1-2ms if a core component is modified and written in C or let us say Rust or Golang

    But anyway, who is a billion dollar HFT trader here ? No one, so no point to get into over killing things
  • srinidhihebbar
    I do trade a medium latency code, and the candle formation time is pretty much the same. There is no harm in improving the code even though we are not a billion dollar HFT.
  • kiteapi
    I think there is code in this forum to do this, to create bars from WS data.

    Also, why do you want to use your system time to form/create the candle/bar, use the time from the received WS ticks, that way there is no issue even ms levels, as these are timestamps from the exchange itself.
  • tahseen
    @kiteapi If there is then fine, no need for me to share the code. Also, I never stated time as my system time

    @srinidhihebbar This thread is about code that am planning to share. I stated from cost benefit analysis. The discussion is not about improving your code, you are free to do whatever you want to with your code
  • tahseen
    Also forgot to mention that roughly 750 instruments - 1 minute candle generated every minute within 0.5 seconds
  • srinidhihebbar
    How many candles data are you saving ?
  • Tusar369
    Does Kite charges an additional fee for Historical Data (1M, 5M, 15M), or it is fine with 2K charges to get both LIVE and HISTORICAL data?
  • srinidhihebbar
    @Tusar369 even kite takes time to save data to database and make candles so historical data is pretty much useless in live market for medium or low latency strategies , it is faster to do it on your end historical data is just useful for backtesting.
  • tahseen
    @srinidhihebbar I stated 750 instrument candles. Anyway, if you have already written program, which is fast enough then you can ignore my thread
  • ravindra
    @tahseen I am keen to see this code. Can you please share?
  • tahseen
    https://github.com/tahseenjamal/kite_candles
Sign In or Register to comment.