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
required
Required string length: 1 - 64
Example:

"7b2f4e19-0c6d-4a83-9e51-d4a8b3c2f706"

Body

application/json
quantity
string

The new total shares, counting what has already filled. It cannot be less than the filled quantity.

Pattern: ^\d+(?:\.\d+)?$
offset_ticks
integer

How many price ticks behind the best price on its own side the order rests, from 0 to 10. Give at most one of offset_ticks, offset_price, offset_shares and offset_beat_best.

Required range: 0 <= x <= 10
offset_price
string

How far behind the best price on its own side the order rests, in dollars from 0 to 0.1. Give at most one of offset_ticks, offset_price, offset_shares and offset_beat_best.

offset_shares
string

The most shares the order lets rest ahead of it in the queue, from 0 to 10,000,000 in steps of 0.01. The order rests one tick inside the first price level that would put more shares ahead of it. Give at most one of offset_ticks, offset_price, offset_shares and offset_beat_best.

Pattern: ^\d+(?:\.\d+)?$
offset_beat_best
enum<boolean>

Set to true to rest one tick better than the best price on its own side, so the order is first in the queue. It stops one tick short of the other side, so it never crosses the spread. Give at most one of offset_ticks, offset_price, offset_shares and offset_beat_best.

Available options:
true
price_limit
string | null

The new worst price the order rests at, in dollars between 0.0001 and 0.9999. Send null to remove the limit and follow the book wherever it goes.

Response

The limit chase, with the edit accepted

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