Order Status not Updating

rejeesh31
#1 my kiteXL is frequently logged out hence not able to place orders based on my automated algo...what could be the reason and how do we fix this?
#2 GetOrderStatus(A3) is returning null at times and works fine at times. GetOrderStatus acting is weird! the order is complete in kite and still showing 'Trigger Pending' when i fire getorderstatus, how do i really find if an order is complete using getorderstatus?

without the orderstatus up-to-date, I cannot complete my automation, please help
Tagged:
  • sujith
    Hi @rejeesh31,
    If you log in to PI or NEST then you will be logged out of the current session. I would suggest using Kite for monitoring purpose and make sure you don't log out of Kite. If you log out of Kite then you are logged out everywhere.

    KiteXL is by @botany02, maybe he can help you with it.
  • rejeesh31
    rejeesh31 edited November 2017
    @sujith Thank you for the prompt response!

    I do not use pi along with KiteXL since i have realized this issue earlier. Here I'm only logged on to kite and kiteXl. but kite xl stops working intermittently and when i check it looks like kitexl is logged out. this is really frustrating! happens again today.

    also with the getorderstatus() returning null would you know what could be the reason?!

    I cannot see getorderstatus returning incorrect values as a problem with KiteXL. if that was the case it would never have returned any value. In this i'm seeing a valid order status sometimes, null sometimes and incorrect order status sometimes. Could you please investigate? getting the status-change of open-orders is really critical for my model to work! please advise

    Thanks
  • rejeesh31
    rejeesh31 edited November 2017
  • rejeesh31
    rejeesh31 edited November 2017
  • botany02
    @rejeesh31
    #1 This may be due to Temp Files/Cookies/Cache , most of the time this issue caused by system, so you have to dig out. You may try the below;
    1. Delete Temp Files/Cookies/Cache
    2. Try running KiteXL in other Laptop/PC, see whether the issue continues o not

    #2 'GetOrderStatus' will return order status from the stored value. KiteXL is not fetching the status from Kite Server, this is so because to prevent users from getting 429 error and for fast performance, otherwise if fetching from Kite Server for multiple orders will lead to system instability and 429 error.

    when you place a order, KiteXL stores the order id in a key with initial status as Null and starts a thread to fetch order status in a loop with interval 10 sec and exits the loop once the order status changes to 'COMPLETE', 'REJECTED' or 'CANCELLED' and stores the Final order status in the Key. This is so because, since the order status is sent via post-back that needs a domain and the domain should be connected to user KiteXL via some communication mechanism like TCP/IP, so we implemented thread for checking the order status.
    This will work fine until you have limited number of orders or the order type is Market (The loop will exit immediately as your order will be COMPLETE with Market order type).
    But when you place more order with order type as LIMIT, more threads are created, all threads keep on running (as LIMIT order) and all threads simultaneously trying to fetch order status in a loop with interval, thus leads to 429 error and system instability.When a thread experience a 429 error, it exits the loop, so leaving the order status to NULL forever till you reopen the KiteXL or Fetch order Book.

    This is the known issue as we don't have any other option (as post-back is the only way to get order updates and that requires domain and integration with KiteXL)

    We are updating the KiteXL, which will be released soon with Post-back support.
    This version will give user more flexible than ever, you will get each and every data and updates.
    You have more control over your system and increased stability, lot more functions to manipulate orders, symbols and positions, options to login in chrome and use the access token in Excel(can ignore IE).

    (If Order updates through web-sockets is implemented by Zerodha, then it's bonus, we no need to rely on post-back and will have fast updates)

    We recommend, you wait for our release.
  • botany02
    @rejeesh31
    #1 This may be due to Temp Files/Cookies/Cache, most of the time this issue caused by system, so you have to dig out. You may try the below;
    1. Delete Temp Files/Cookies/Cache
    2. Try running KiteXL in other Laptop/PC, see whether the issue continues o not

    #2 'GetOrderStatus' will return order status from the stored value. KiteXL is not fetching the status from Kite Server, this is so because to prevent users from getting 429 error and for fast performance, otherwise if fetching from Kite Server for multiple orders will lead to system instability and 429 error.

    when you place a order, KiteXL stores the order id in a key with initial status as Null and starts a thread to fetch order status in a loop with interval of 10 sec and exits the loop once the order status changes to 'COMPLETE', 'REJECTED' or 'CANCELLED' and stores the Final order status in the Key. This is so because, since the order status is sent via post-back that needs a domain and the domain should be connected to user KiteXL via some communication mechanism like TCP/IP, so we implemented thread for checking the order status.
    This will work fine until you have limited number of orders or the order type is Market (The loop will exit immediately as your order will be COMPLETE with Market order type).
    But when you place more order with order type as LIMIT or SL or SL-M, more threads are created, all threads keep on running (as LIMIT or SL or SL-M order) and all threads simultaneously trying to fetch order status in a loop with interval, thus leads to 429 error and system instability.When a thread experience a 429 error, it exits the loop, so leaving the order status to NULL forever till you reopen the KiteXL or Fetch order Book.

    This is the known issue as we don't have any other option (as post-back is the only way to get order updates and that requires domain and integration with KiteXL)

    We are updating the KiteXL, which will be released soon with Post-back support.
    This version will give user more flexible than ever, you will get each and every data and updates.
    You have more control over your system and increased stability, lot more functions to manipulate orders, symbols and positions, options to login in chrome and use the access token in Excel(can ignore IE).

    (If Order updates through web-sockets is implemented by Zerodha, then it's bonus, we no need to rely on post-back which requires additional head ache to initiate a communication between KiteXL and the domain.dates)

    We recommend, you wait for our release.
  • rejeesh31
    @botany02 thank you for the explanation.

    as you have pointed out, we are having to do all this circus because Zerodha doesn't broadcast order status via web-socket. I think they should start to do that sooner! Sadly, I'll have to wait for the newer version of kiteXL and the required updates from Zerodha. Do you know the timeline for the new version of kiteXL?

    In the meantime i'll also start exploring upstox

    Regards
    Rejeesh
Sign In or Register to comment.