Basket of orders

Hi I am using Kite publisher to place orders of multiple instruments. I am seeing a strange scenario where the basket of stocks are still being referenced in future BUTTON click when the input data is wrong. Is there a way (method) to tell Kite session that kite.add({}) session is a fresh data.

In other words, I have a table with different order data on each row and a button at the end of the column list. When this button is clicked I am placing the order using the row content. However, Kite seems to remember old/cancelled order data which is causing an issue.
  • Vivek
    Vivek edited July 2020
    This seems like issue with object referencing in your JS code. This is a very common JS pitfall, you should make sure to not use same object in rows rendered.
  • pnsudesh
    Hi Vivek,

    I had checked my values by printing them on the console. I think it is to do with kite basket funcitonality where in the previously attempted shares are still hanging on to the basket. I think we need a way to flush the basket before executing next order.

    Also, while placing buy and sell orders, only sells are received by Kite server.
    Zerodha - are there any known issues with kite publisher that I should be aware of?
  • pnsudesh
    I think the add method (add() entry Adds an object literal {} with the parameters mentioned in the previous section represeting a single trading entry to the basket.) is responsible to add new orders but I dont see a remove funciton. Thats the issue.
Sign In or Register to comment.