Delay in Receiving Fills

amarkantk
HI All,
I have running some Algorithm via KiteConnect API.
There have many instances where zerodha fills notify time is very delayed to exchange actual fills timestamp. Can any help me how to resolve that ?

There have been some instances where I got notified 29 seconds later for fills. I can't imagine how Algo will run smoothly over this.

There is another delay of 7sec.

Can anyone please guide me, how to resolve this?
Thanks
  • SRIJAN
    SRIJAN edited February 2
    It's not zerodha or exchange delay. Exchange time is when the order was registered with the exchange,and the 'time' is the timestamp when the order got filled.
  • amarkantk
    Hi,
    I am positing some screenshot here. Right now my system has max latency of 400ms.

    on this chart, we are using different timezone, so time axis is off by 1hr, so please ignore that.


    plot has two lines- green line is best bid price at that time, red line is showing best ask price at same timestamp.
    First subplot is of USDINR march fut is , small blue circle is showing when we notification of fills at price of 75.4475 at 12:052:06 which is zerodha time. AT that time, tick data are being plotted on same - there you can see that at 12:52:06, 75.4450 is offered price.
    so how we can get filled at some which is not at best offered price near that timestamp {only happen when some big aggressor in market is there, but you can clearly see that 75.4475 was best offered price around 12:52:02.00.



    I am pasting order details from Zerodha at same timestamp, exch timestamp are 12:52:02 which seems allright. but zerodha notification time are 4 second delayed.

    Hope this explains some delay in fills notification.
    thanks for prompt reply.
  • rakeshr
    rakeshr edited February 2
    @amarkantk
    We checked your order detail of tradeID: 265188 and there seems to be no issue in the same. Initially, you placed a LIMIT pending order at 75.4325. Modified it 20 times, the last modification registered at the exchange was at 13:45:55.431656, the same order was in pending state and got completed/filled at 13:46:24.63613 . So, you are seeing the Time column i.e fill_timestamp as 13:46:24 and order exchange time as 13:45:55.
    If you are looking for immediate order fill, you need to place a MARKET order.
    Also, regarding the tick value captured above. It's not a correct representation, this article explains more.

    If you are looking for HFT, you will need to get a colo setup at the exchange premises where ticks are streamed via LAN and not internet. The basic setup itself costs upwards 18 lakhs/annum. You can write to kiteconnect(at)zerodha.com if you are interested for the colo setup. We can help you with it.
  • amarkantk
    Hi Rakesh,
    I see my mistake - so exch time is last modified registered time at exch.
    I went through the Article you suggested.
    Things I can understand - there might be some tick drop while receiving ticks due to internet fluctuation.

    I am little bit confused when you say- its not correct representation.
    We are plotting tick chart based on received continuous ticks from Zerodha. so I am receiving ticks with some delay due to internet fluctuation.

    Can you please check for USDINR22MARFUT ask tick price during interval of 12:52:01 to 12:52:08 ? As data with me showing, during fill time 12:52:06, 75.4450 was best ask price.
    It will ensure that I am having latency while getting tick data or missing some tick data over internet.

    Thanks for info about colo space. We will discuss with teams.
    Thanks
Sign In or Register to comment.