Orders - WebSocket / PostBack - Open Questions

gautamsatpathy
After reviewing the WebSocket and PostBack API documentation, as well as a number of Forum posts (Redundant postback (repost), How to receive order status in KiteTicker socket, Getting same status message from on_order_update multiple times, etc), I still have open questions on the Order updates.
  1. status:What are the valid values for this field? The doc pages mention "COMPLETE, CANCEL, REJECTED, UPDATE". Is that the full list?
  2. Partial Fills:What is the status field value for Partial Fill update messages? Is there a status value for this or do we have to calculate it from the filled_quantity, unfilled_quantity and pending_quantity fields?
  3. variety: What is the list of valid values for this field? Docs only mention "regular".
  4. order_type:What is the list of valid values for this field? Docs only mention "MARKET".
  5. transaction_type:What is the list of valid values for this field? Docs only mention "BUY". Is it only "BUY" and "SELL" or are there other values?
  6. validity:What is the list of valid values for this field? Docs only mention "DAY". What are the values for IOC and Minutes (as in Kite UI)
  7. product:What is the list of valid values for this field? Docs only mention "CNC"
  8. price:Doc mentions "Price at which the order was placed (LIMIT orders)". What about SL and SL-M Orders? Will this field be 0 / NaN for MARKET orders?
  9. cancelled_quantity:Documentation mentions "Quantity that had been cancelled". When does this have a valid value?
Would request Zerodha people & other Forum users to please help answer these open questions. Or point me at the right place.

@sujith
  • sujith
    You can refer to all the constants here.

    We suggest using the order_update via Websockets API or postback as an event to fetch orderbook and check the latest status and filled_quantity to know the latest update about the order. There are multiple edge cases (like redundant update, aysnc behavior of postbacks) that are not handled by the OMS Hence we suggest this approach.
  • gautamsatpathy
    Fantastic! Thanks @sujith.
This discussion has been closed.