> For the complete documentation index, see [llms.txt](https://docs.pangolin.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pangolin.exchange/pangoperps/trading-api/order-management/edit-order.md).

# Edit Order

Change the price or quantity of a pending PangoPerps order.

### Endpoint

**PUT /v1/order**

Mainnet: `PUT https://api.orderly.org/v1/order`

Testnet: `PUT https://testnet-api.orderly.org/v1/order`

Rate limit: 10 requests per second. This authenticated endpoint updates a pending order identified by its order ID. The supported amendment is limited to changing the order price or order quantity; do not use it to change other order settings. The API key must include the \[1mtrading\[0m scope.

### Authentication headers

Send the signed-request headers with every call:

* \[1morderly-timestamp\[0m — request timestamp in milliseconds.
* \[1morderly-account-id\[0m — PangoPerps account ID.
* \[1morderly-key\[0m — public API key.
* \[1morderly-signature\[0m — signature for the request.
* \[1mContent-Type: application/json\[0m — identifies the JSON request body.

### Request body

The endpoint accepts a JSON object with these fields:

| Field                       | Type    | Required | Description                                             |
| --------------------------- | ------- | -------- | ------------------------------------------------------- |
| \[1morder\_id\[0m         | string  | Yes      | ID of the pending order to amend.                       |
| \[1msymbol\[0m            | string  | Yes      | Market symbol for the order.                            |
| \[1morder\_type\[0m       | string  | Yes      | Order type.                                             |
| \[1mside\[0m              | string  | Yes      | Order side.                                             |
| \[1mclient\_order\_id\[0m | string  | No       | Client-assigned order identifier, when used.            |
| \[1morder\_price\[0m      | number  | No       | Updated order price.                                    |
| \[1morder\_quantity\[0m   | number  | No       | Updated order quantity.                                 |
| \[1morder\_amount\[0m     | number  | No       | Quote-currency amount for supported order types.        |
| \[1mreduce\_only\[0m      | boolean | No       | Whether the order may only reduce an existing position. |
| \[1mvisible\_quantity\[0m | number  | No       | Quantity displayed on the order book.                   |

Only \[1morder\_price\[0m or \[1morder\_quantity\[0m is amendable through this operation. Keep the other order details consistent with the existing order.

### Example request

```bash
curl --request PUT \
  --url 'https://api.orderly.org/v1/order' \
  --header 'Content-Type: application/json' \
  --header 'orderly-account-id: <account-id>' \
  --header 'orderly-key: <public-api-key>' \
  --header 'orderly-signature: <signature>' \
  --header 'orderly-timestamp: <timestamp-in-ms>' \
  --data '{
    "order_id": "123456789",
    "symbol": "PERP_ETH_USDC",
    "order_type": "LIMIT",
    "side": "BUY",
    "order_price": 3450.5
  }'
```

### Successful response

HTTP 200 confirms that the edit request was accepted for processing. The response status is \[1mEDIT\_SENT\[0m.

```json
{
  "success": true,
  "data": {
    "status": "EDIT_SENT"
  },
  "timestamp": 1702989203989
}
```
