MODIFY ORDER API
This API allows you to modify an existing pending order.
You can update order parameters such as quantity, price, validity, and order type before the order is executed.
🔗 Path Parameters
| Parameter | Type | Required | Description | Example |
|---|
| exchange | string | Yes | Exchange segment | "NSE_EQ" |
| order_id | string | Yes | Unique order identifier | "NWSDJ00022N3" |
| 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}} |
📑 Request Body Parameters
| Field | Type | Required | Description | Example / Enum |
|---|
| order_type | string | Yes | Type of order | Refer global constants |
| quantity | integer | Yes | Updated quantity | 10 |
| traded_quantity | integer | Yes | Previously traded quantity (from order book) | 2 |
| price | number | No | Updated price | 100.5 |
| trigger_price | number | No | Trigger price for SL orders | 99.5 |
| disclosed_quantity | integer | No | Disclosed quantity | 5 |
| validity | string | No | Order validity | "DAY" |
| validity_days | integer | No | Validity for GTD orders | 2 |
🟢 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 modified successfully" |
| data | object | Order response payload | Refer to Data Object Fields |
📦 Data Object Fields
| Field | Type | Description | Example |
|---|
| orderId | string | System-generated order identifier | "NWSDJ00022N3" |
📝 Notes
- Only pending (open) orders can be modified.
- For limit orders, ensure valid
price is provided.
- For stop-loss orders,
trigger_price is mandatory.
- Order modification may be rejected if the order is already executed or canceled.