How is trade_id generated in tradebook?

KesharDev
KesharDev edited June 16 in General
In kite.trades(), we get a trade_id for each trade. How is it generated?

My main question is, Is it generated in ascending order based on fill time? I am implementing some logic in my code, so need to know.

Also, is it generated by Kite or Exchange?
Tagged:
  • rakeshr
    In kite.trades(), we get a trade_id for each trade. How is it generated?
    Also, is it generated by Kite or Exchange?
    It is generated by a respective exchange order book. Go through the documentation here.
    My main question is, Is it generated in ascending order based on fill time?
    Yes, mostly. But, most probably those trade_id won't be a subsequent number.
Sign In or Register to comment.