How to check order status vi fyer API v3

Hello,

How can I check order status via API. Like order is pending , Order is executed , order is rejected or order is cancelled.

It can easily be checked by passing the order ID to the orderbook API. For example,

orderId = “23080444447604”

data = {“id”:orderId}

response = fyers.orderbook(data=data)

In the response, for each order ID you will have a status.

  • 1 => Canceled
  • 2 => Traded / Filled
  • 3 => (Not used currently)
  • 4 => Transit
  • 5 => Rejected
  • 6 => Pending
  • 7 => Expired