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

# modify pending forever order

`PUT /forever/orders/{order-id}`

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

## Path parameters

- `order-id` string, required

## Headers

- `access-token` string, required

## Request body

- GttModifyRequest
  - `dhanClientId` string — User specific identification generated by Dhan
  - `orderId` string — Order specific identification generated by Dhan
  - `orderFlag` 'SINGLE' | 'OCO' — | **Enum Values** | **Description** | |------------------|-----------------------------| | SINGLE | For GTT Order types | | OCO | For OCO Order types |
  - `orderType` 'LIMIT' | 'MARKET' — | **Enum Values** | **Description** | |------------------|-----------------------------| | LIMIT | For Limit Order types | | MARKET | For market Order types |
  - `legName` 'TARGET_LEG' | 'STOP_LOSS_LEG' — | **Enum Values** | **Description** | |----------------------|-----------------------------------------------| | TARGET_LEG | For Target Leg | | STOP_LOSS_LEG | For SL leg, in case of OCO OrderType |
  - `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` string — Valid for 1Year/Expiry

## Response `200`

Successful operation

- GttOrderStatusResponse
  - `orderId` string — Order specific identification generated by Dhan
  - `orderStatus` 'PENDING' | 'REJECTED' | 'CANCELLED' | 'EXPIRED' — | **Enum Values** | **Description** | |-----------------|---------------------------------------------| | PENDING | Reached at exchange end, awaiting execution | | REJECTED | Rejected at exchange/broker’s end | | CANCELLED | Cancelled by user | | 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)
