# Modify Bracket Order

## PUT /api/oms/modify-order/bo

Modify Bracket Order

to modify the bracket order

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| Authorization | header | string | Yes | Access token in the following format:  Bearer <api_key>:<access_token>  Both values are required. The `api_key` is your app credential from the Apps Section. The `access_token` is obtained from the authentication endpoint and is valid for 24 hours. |

### Request Body (application/x-www-form-urlencoded)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| symId | string | Yes | Unique identifier of the symbol |
| orderId | string | Yes | Order id of an order which needs modification. This id will be received in orders service |
| qty | number | Yes | Total order quantity after the modification. ( Filled Qty (if nonzero) + (Modified Qty or Pending Qty)). Example: If the order quantity is 100, out of that 60 is already filled, and if we are modifying the pending qty from 40 to 70 then qty => (60 + 70) = 130 should be sent. |
| type | string ("limit" | "market" | "stoplimit") | Yes | Price type of an order |
| limitPrice | number | No | Main leg order price. Required only for 'limit' and 'stoplimit' orders |
| trigPrice | number | No | This is applicable only for the main leg order and required only if the order type is 'stoplimit' |
| mktProt | number | No | This is applicable only for the main leg order and required only if the order type is 'market' |
| stopTrigPrice | number | Yes | Stop loss leg trigger price. This is the difference of main leg price and the stop loss leg trigger price. If your main leg order price is '2400' and if you want to set the stop loss trigger at '2300' then pass the difference '100' in this field. |
| targetPrice | number | Yes | Target leg price. This is the difference of main leg price and the target leg price. If your main leg order price is '2400' and if you want to set the target or profit order price for 2500 then pass the difference '100' in this field |
| trailingStopPrice | number | No | Trailing stop loss price. |
| side | string ("buy" | "sell") | No | Order side 'buy' or 'sell' |

### Responses

#### 200 — OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| s | string ("ok" | "no-data" | "error") | No |  |
| d | object | No |  |
| d.msg | string | No |  |
| d.orderId | string | No |  |
| msg | string ("no-data" | "error msg") | No |  |
| s | string ("ok" | "error" | "no-data") | No |  |

#### 400 — Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| s | string ("error") | No | Response status. Always `error` for error responses. |
| msg | string ("Internal Error occurred. Kindly try again." | "Input validation failed. Kindly check your input contains required fields for the request") | No | Error message describing which field failed validation or why the request was rejected. |

#### 401 — Unauthorized — one of: (1) invalid or expired access token — tokens expire after 24 hours, re-authenticate to get a new one; (2) `Authorization` header missing or malformed — use format `Bearer <api_key>:<access_token>`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| s | string ("error") | No | Response status. Always `error` for error responses. |
| msg | string ("Unauthorized") | No | Error message. |

#### 429 — Too Many Requests — rate limit exceeded. General API: 10 req/sec per auth token (400 req/min).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| s | string ("error") | No | Response status. Always `error` for error responses. |
| msg | string | No | Error message indicating the rate limit was exceeded. |

#### 500 — Internal Server Error — retry with backoff; contact support if it persists.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| s | string ("error") | No | Response status. Always `error` for error responses. |
| msg | string | No | Error message. |