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:

"3c9d2e71-5a4b-4f08-b6e2-91d7c0a4f5e3"

Body

application/json
trigger_price
string

The new best bid, in dollars per share between 0.0001 and 0.9999, that starts the sale. As at creation, a stop_loss must stay below the current best bid and a take_profit above it.

quantity
string

The new total shares to sell, counting any already sold. Together with the account’s other stop losses on these shares, at most what the account holds.

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

How far below trigger_price the sale may fill, in dollars above 0 and at most 0.2, on the market’s price tick and below trigger_price.

Response

The stop loss, with the edit applied

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