---
title: "Modify an active limit order"
url: https://docs.truemarkets.co/api/gateway/modify-order
description: "Changes the price and/or quantity of an active CeFi limit order. The change is asynchronous: the order's stored price and quantity update once the exchange confirms the modification. Only active limit orders are modifiable. On a DeFi-settled market, a modification that holds more than the CeFi balance covers first allocates the difference from the user's DeFi wallet and is queued until it lands; if the queued modification then fails, the user is notified and the order keeps its previous price and quantity."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Modify an active limit order

Changes the price and/or quantity of an active CeFi limit order. The change
is asynchronous: the order's stored price and quantity update once the
exchange confirms the modification. Only active limit orders are modifiable.
On a DeFi-settled market, a modification that holds more than the CeFi
balance covers first allocates the difference from the user's DeFi wallet
and is queued until it lands; if the queued modification then fails, the
user is notified and the order keeps its previous price and quantity.

**Rate limit:** counts against the Orders limit, 10 a second and 120 a minute (user token, per user); 100 a second and 1,200 a minute (organization api key, per organization). See [Rate limits](https://docs.truemarkets.co/developer-resources/rate-limits).

## Request

```
PATCH https://api.truemarkets.co/v1/gateway/orders/{id}
```

### Authentication

Bearer token in `Authorization`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `TM-On-Behalf-Of` | header | string (uuid) | no | Act as one of your organization's users. The value is the `user_id` returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: `400` for a personal token, a repeated header or a non-UUID, `403` for a user outside your organization. Not accepted on organization-scoped routes. |
| `id` | path | string | yes | Order ID |

### Body

`application/json`, required

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `price` | string | no | New limit price per unit of base asset as a positive decimal string. |
| `qty` | string | no | New quantity as a positive decimal string. |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 202

Modification request accepted

Type: object

### 400

Bad request

### 401

Unauthorized

### 403

Forbidden. On order creation this also covers an asset that is not available to trade from the country the request came from.

### 404

Not found

### 409

Conflict

### 500

Internal server error

### 503

Service unavailable
