Skip to main content
PATCH
Error

Authorizations

Authorization
string
header
required

A Lean API key, sent as Authorization: Bearer <key>. A test key (lean_sk_test_...) simulates orders and fills with no money; a live key (lean_sk_live_...) trades for real within the key's limits. Every successful response says which mode answered in data.livemode.

Path Parameters

id
string<uuid>
required
Example:

"8a1e5c07-4b3f-4d62-9f18-2c7e0a95d4b1"

Body

application/json
limit_price
string

The new worst price per share, in dollars. Omit to keep the current one.

quantity
string

The new total size in shares, counting what already filled. Omit to keep the current one.

Pattern: ^\d+(?:\.\d+)?$
client_order_id
string

An unused client_order_id for a replacement order. Omit and Lean picks one if needed. An in-place amend keeps its original client_order_id.

Pattern: ^[A-Za-z0-9_-]{1,64}$

Response

The amended order or its linked replacement

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required