ORDER BOOK
This API retrieves the Order Book for authorized end users through a middleware-based integration.
The Order Book contains details of all orders placed by the user, including pending, completed, rejected, and cancelled orders.
| Fields | Type | Required | Description | Example |
|---|
| Authorization | string | Yes | Bearer token for authentication | access_token |
| x-api-key | string | Yes | API key provided | x-api-key |
🔍 Query Parameters
| Fields | Type | Required | Description | Example |
|---|
| userId | string | Yes | User ID (UCC) | {{user_id}} |
| offset | integer | No | Specifies the page number of the collection to be displayed | 1 |
| limit | integer | No | Limits the number of items returned per page | 20 |
| orderStatus | number | No | Filter orders by status | -1 |
🟢 Success Response - 200 OK
| Fields | Type | Description | Example |
|---|
| status | string | Response status | "success" |
| code | string | Response code | "s-101" |
| message | string | Success message | "Order Book fetched successfully" |
| data | array(object) | List of order records | See below table |
📘 Order Object Fields
| Fields | Type | Description | Example |
|---|
| order_id | string | System generated unique order number | "NXVZO00098K1" |
| exchange | string | Exchange segment | "NSE_EQ" |
| scrip_token | integer | Exchange token number of the scrip | 1594 |
| exchange_order_no | string | Exchange order number | "120000000123456" |
| status | string | Current order status | "OPEN" |
| error_reason | string | Reason for rejection, cancellation, or modification failure | "Insufficient Margin" |
| transaction_type | string | Buy or Sell transaction | "BUY" |
| product_type | string | Product type | "D" |
| order_type | string | Order type | "RL" |
| total_quantity | integer | Original order quantity | 100 |
| pending_quantity | integer | Pending quantity | 50 |
| traded_quantity | integer | Executed quantity | 50 |
| disclosed_quantity | integer | Quantity disclosed to the market | 25 |
| order_price | number | Order price | 2500.50 |
| trigger_price | number | Trigger price | 2495.00 |
| validity | string | Order validity | "DAY" |
| validity_days | integer | Number of days for GTD validity | 30 |
| symbol | string | Trading symbol | "INFY" |
| series | string | Series | "EQ" |
| instrument | number | Instrument name/type | 1 |
| expiry_date | string | Contract expiry date | "2026-07-30" |
| strike_price | string | Strike price | "2500000" |
| option_type | string | Option type | "CE" |
| market_lot | integer | Market lot size | 50 |
| order_timestamp | string | OMS order timestamp | "2026-07-02 10:15:30" |
| exchange_timestamp | string | Exchange order timestamp | "2026-07-02 10:15:31" |
| initiated_by | string | Application identifier through which order was placed | "MOBAPP" |
| modified_by | string | Application identifier through which order was modified | "WEBAPP" |
| is_amo_order | string | Indicates whether order is an AMO order | "N" |
| gateway_order_id | string | Internal gateway order identifier | "GW12345678" |
| order_identifier | string | User-defined order reference | "ORD001" |
| bracket_details | object | Bracket Order-related details (if applicable) | {} |
| Fields | Type | Description | Example |
|---|
| total_records | number | Total orders returned in the response | 20 |
| all_records | number | Total order count | 150 |
| completed_records | number | Count of completed orders | 90 |
| open_records | number | Count of open/pending orders | 60 |
📝 Notes
- Retrieves order history and current order status for the user.
- Supports pagination using:
- Orders can be filtered using the
orderStatus parameter.
- Returns details for:
- Pending Orders
- Completed Orders
- Rejected Orders
- Cancelled Orders