kite order history.. return time doest have mil seconds

rajagopal
rajagopal edited May 2020 in Python client
Hi Team,
I am checking the current status of the order I have placed. sometimes I need to modify the order. in that case. I have multiple Trigger pending states? can you assure that the response will always be sorted in the DateTime (order_timestamp or exchange_update_timestamp) column?

response = kite.order_history(order_id)

[exchange_update_timestamp], [status]
2020-05-19 09:17:12 TRIGGER PENDING
2020-05-19 09:17:12 MODIFY VALIDATION PENDING
2020-05-19 09:17:12 MODIFY PENDING
2020-05-19 09:23:58 MODIFIED
2020-05-19 09:23:58 TRIGGER PENDING
2020-05-19 09:23:58 MODIFY VALIDATION PENDING
2020-05-19 09:23:58 MODIFY PENDING
2020-05-19 09:25:16 MODIFIED
2020-05-19 09:25:16 TRIGGER PENDING
2020-05-19 09:25:16 MODIFY VALIDATION PENDING
2020-05-19 09:25:16 MODIFY PENDING
2020-05-19 09:31:07 MODIFIED
2020-05-19 09:31:07 TRIGGER PENDING
2020-05-19 09:31:07 MODIFY VALIDATION PENDING
2020-05-19 09:31:07 MODIFY PENDING
2020-05-19 09:31:57 MODIFIED
2020-05-19 09:31:57 TRIGGER PENDING
2020-05-19 09:31:57 MODIFY VALIDATION PENDING
2020-05-19 09:31:57 MODIFY PENDING
2020-05-19 09:41:01 MODIFIED
2020-05-19 09:41:01 TRIGGER PENDING
  • sujith
    Order history is a list of statuses the order has gone through in our system. If you want the latest state then jump to the last item and check the status.
    Or you can pull orderbook and check the order status.
  • rajagopal
    yes.. but order book has timestamp only Sec. if you see in the above LIVE example.
    2020-05-19 09:41:01 MODIFIED
    2020-05-19 09:41:01 TRIGGER PENDING

    "last item and check the status." --> Zerodha System will always sort?

    will there be any case where we will get like this?
    2020-05-19 09:41:01 TRIGGER PENDING
    2020-05-19 09:41:01 MODIFIED

    status changed in sec.. since we don't have the milli sec to sort.
  • sujith
    sujith edited May 2020
    I would suggest don't look at the timestamp at all. Just jump to the last item and consider it as the latest status of the order.
    We can't assure you if there will be status change within a second or more than a second. It is arbitrary.
Sign In or Register to comment.