ORDER BOOK API
This API returns the complete list of orders from the All Orders tab, including pending, completed, and all orders based on filters.
🔍 Query Parameters
| Parameter | Type | Required | Description | Example |
|---|
| client_id | string | No | Client ID to fetch orders for a specific user | client_id=VISHAL1 |
| offset | integer | No | Page number for pagination | offset=1 |
| limit | integer | No | Number of records per page | limit=20 |
| orderStatus | number | No | Filter orders (1 = Pending, 2 = Completed, -1 = All) | orderStatus=-1 |
| Header | Type | Description | Example |
|---|
| Content-Type | string | Specifies the media type of the request | application/json |
| Authorization | string | Access token for authenticated requests | {{access_token}} |
| x-api-key | string | API key used to authorize the request | {{x-api-key}} |
🟢 Success Response - 200 OK
Content-Type: application/json
| Field | Type | Description | Example |
|---|
| status | string | Status of API call | "success" |
| code | string | Response code to user request | "s-101" |
| message | string | Success message | "Order book fetched successfully" |
| data | array | List of orders | Refer to Data Object Fields |
| metadata | object | Summary of order records | Refer to Metadata Fields |
📦 Data Object Fields
| Field | Type | Description |
|---|
| order_id | string | Unique order ID |
| exchange | string | Exchange segment |
| scrip_token | integer | Exchange token |
| exchange_order_no | string | Exchange order ID |
| status | string | Order status |
| error_reason | string | Error message (if rejected/cancelled) |
| transaction_type | string | BUY or SELL |
| product_type | string | Product type |
| order_type | string | Order type |
| total_quantity | integer | Total order quantity |
| pending_quantity | integer | Pending quantity |
| traded_quantity | integer | Executed quantity |
| disclosed_quantity | integer | Disclosed quantity |
| order_price | number | Order price |
| trigger_price | number | Trigger price (SL orders) |
| validity | string | Order validity |
| validity_days | integer | Validity for GTD |
| symbol | string | Scrip symbol |
| series | string | Series |
| instrument | number | Instrument type |
| expiry_date | string | Expiry date |
| strike_price | string | Strike price |
| option_type | string | CE/PE |
| market_lot | integer | Lot size |
| order_timestamp | string | OMS timestamp |
| exchange_timestamp | string | Exchange timestamp |
| initiated_by | string | Source of order placement |
| modified_by | string | Source of order modification |
| is_amo_order | string | AMO flag |
| gateway_order_id | string | Internal gateway order ID |
| order_identifier | string | Custom order identifier |
📘 Bracket Order Details
| Field | Type | Description |
|---|
| parent_order_id | string | Main leg order ID |
| leg_indicator | string | Leg identifier |
| stoploss_price | number | Stop-loss price |
| stoploss_trigger_price | number | Stop-loss trigger |
| profit_price | number | Profit leg price |
| stoploss_jump_price | number | Trailing SL increment |
| ltp_jump_price | number | LTP increment |
| bo_order_id | string | Bracket order ID |
| bo_order_status | string | BO status |
| bo_modify_flag | number | Allowed modification flags |
| Field | Type | Description |
|---|
| total_records | number | Total orders count |
| all_records | number | All orders count |
| completed_records | number | Completed orders count |
| open_records | number | Open orders count |