Get order book (order history)

The order book lists every order placed today, in every state (pending, complete, rejected, cancelled).

orders = kite.orders()
for o in orders:
    print(o["order_id"], o["tradingsymbol"], o["status"], o["filled_quantity"])

Key fields:

{
  "order_id": "230914000012345",
  "tradingsymbol": "INFY",
  "transaction_type": "BUY",
  "order_type": "LIMIT",
  "product": "CNC",
  "quantity": 10,
  "filled_quantity": 10,
  "pending_quantity": 0,
  "status": "COMPLETE",       # OPEN, COMPLETE, CANCELLED, REJECTED, TRIGGER PENDING
  "status_message": None,     # populated on REJECTED with the reason
  "order_timestamp": "2026-09-13 09:16:03",
}

Status values you must handle explicitly

  • OPEN — resting on the exchange, unfilled or partially filled.
  • COMPLETE — fully filled.
  • CANCELLED — you (or the exchange) cancelled it.
  • REJECTED — never reached the exchange or was bounced; check status_message (chapter 57).
  • TRIGGER PENDING — an SL/SL-M order waiting for its trigger price to be hit; not yet a live order on the exchange.
def get_order_status(kite, order_id: str) -> str:
    history = kite.order_history(order_id)
    return history[-1]["status"]   # most recent status in the order's timeline

kite.orders() gives current state; kite.order_history(order_id) gives the full timeline of state transitions for one order — useful for debugging exactly when/why an order moved from OPEN to REJECTED.

Why poll this instead of trusting your own placed-order response

The response to place_order() only confirms the order was *accepted for submission* — it returns an order_id, not a fill. The real outcome (filled, rejected, partially filled) only shows up in the order book moments later, or via WebSocket order updates. Never treat "place_order returned successfully" as "the trade happened."

Next: 019 — Get trade book (executed fills)