---
title: "modify pending order"
method: PUT
path: "/orders/{order-id}"
tags: ["Orders"]
---

# modify pending order

`PUT /orders/{order-id}`

The api allows you modify pending order in orderbook. The fields that can be modified are price, quantity, order type & validity.

## Path parameters

- `order-id` string, required

## Headers

- `access-token` string, required

## Request body

- OrderModifyRequest
  - `dhanClientId` string — User specific identification generated by Dhan
  - `orderId` string — Order specific identification generated by Dhan
  - `orderType` 'LIMIT' | 'MARKET' | 'STOP_LOSS' | 'STOP_LOSS_MARKET' — | **Enum Values** | **Description** | |------------------|-----------------------------| | LIMIT | For Limit Order types | | MARKET | For market Order types | | STOP_LOSS | For Stop Loss Limit orders | | STOP_LOSS_MARKET | For Stop Loss Market orders |
  - `legName` 'ENTRY_LEG' | 'STOP_LOSS_LEG' | 'TARGET_LEG' | 'NA' — Order leg where modification is to be done
  - `quantity` integer — Number of shares for the order
  - `price` number, float — Price at which order is placed
  - `disclosedQuantity` integer — Number of shares visible (Keep more than 30% of quantity)
  - `triggerPrice` number, float — Price at which the order is triggered, in case of SL-M & SL-L
  - `validity` 'DAY' | 'IOC' — | **Enum Values** | **Description** | |-----------------|-----------------------| | DAY | Valid till end of day | | IOC | Immediate or Cancel |

## Response `200`

Successful operation

- OrderStatusResponse
  - `orderId` string — Order specific identification generated by Dhan
  - `orderStatus` 'TRANSIT' | 'PENDING' | 'REJECTED' | 'CANCELLED' | 'PART_TRADED' | 'TRADED' | 'EXPIRED' | 'MODIFIED' | 'TRIGGERED' | 'INACTIVE' — | **Enum Values** | **Description** | |-----------------|---------------------------------------------| | TRANSIT | Did not reach the exchange server | | PENDING | Reached at exchange end, awaiting execution | | REJECTED | Rejected at exchange/broker’s end | | CANCELLED | Cancelled by user | | PART_TRADED | Partially Executed | | TRADED | Executed | | EXPIRED | Validity of order is expired |

---

[API](https://skmtc.dev/dhan/apis/dhanhq-api.md) · [All operations](https://skmtc.dev/dhan/apis/dhanhq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dhan/dhanhq-api/revisions/2d368b9ed32d/schema)
