Update an order
Changed onUpdate a previously submitted flash order's limit price, trigger price, or bracket legs.
Executed as a cancel-and-replace under the same orderId. What each order type accepts:
| Order type | limitCrossPrice / limitNotionalPrice | trigger | triggers |
|---|---|---|---|
| limit | yes (exactly one) | no | no |
| stop, stop-loss, take-profit (no limit price — market execution) | no | yes | no |
| stop-limit / take-profit-limit (placed with a limit price) | yes (exactly one) | yes | no |
| bracket (standalone, or the pair an attached bracket minted) | no | no | yes (both legs) |
Every other order type is rejected with 422. Send at least one of the limit or trigger fields; on the -limit variants both can travel in one update.
On the -limit variants the limit price is the post-trigger execution limit — where the order rests once its trigger fires — and the trigger price is where it arms; each moves independently. A trigger update moves the threshold only: the direction (triggerType) and the price basis (cross vs notional) must match what the order's trigger was placed with — unlike the limit price, whose basis can be switched freely. Updating after the trigger has already fired is also valid for the limit price: the resting limit order is cancelled and re-placed at the new price (a trigger update at that point is rejected — there is no trigger left to move).
A bracket update re-sends both legs under triggers: each leg's new trigger price (same direction and basis it was placed with) and an optional limitPrice. The update replaces both legs' prices and limits; a leg sent without limitPrice sells at market when it fires. Leg count and directions are fixed. An attached pair is updated by the bracketOrderId its entry reports once the entry has filled. Before that bracketOrderId is null and there is no bracket order to update: triggers sent to the entry itself returns 422 on a market or twap entry and 400 on a limit entry.
Signature required. Construct the canonical UTF-8 update message and sign it with the funder wallet:
- Message format (a Limit ... Price: line, a Trigger ... Price: line, or both — limit first):
Definitive Flash — Update Order
Order: <orderId>
Issued At: <RFC3339 UTC>
Limit Cross Price: <decimal>
Trigger Lower Cross Price: <decimal>
- The Limit line is Limit <Cross|Notional> Price:, matching the request's limit field. The Trigger line is Trigger <Lower|Upper> <Cross|Notional> Price: — direction from trigger.triggerType, kind from which trigger price field is set. Each price must be byte-identical to the request value.
- A bracket update has no Limit line and one Trigger line per leg, the lower leg first, each followed by Trigger <Lower|Upper> Limit Price: <decimal> only when that leg carries limitPrice:
Definitive Flash — Update Order
Order: <orderId>
Issued At: <RFC3339 UTC>
Trigger Lower Notional Price: <decimal>
Trigger Lower Limit Price: <decimal>
Trigger Upper Notional Price: <decimal>
- The message binds the order id, every updated value, and an Issued At: freshness stamp (rejected outside a small skew window) to prevent replay of a captured signature. Use RFC3339 with sub-second precision (e.g. new Date().toISOString()) to issue more than one update per second on the same order.
- EVM chains — sign with EIP-191 personal_sign over the message bytes; pass the 65-byte 0x-prefixed hex signature as userSignature.
- SVM (solana) — sign with Ed25519 over the message bytes; pass the 64-byte base58 signature as userSignature.
- Echo the exact message text back as updateMessage.
Errors: 400 when the order type takes the update but not the fields sent (trigger on a limit or bracket order, a limit on a market-execution trigger type or a bracket, triggers on anything but a bracket), the new trigger changes direction or basis, a price or leg limit is not positive, or the order would fall below the minimum notional at the new prices (order below minimum notional size requirement); 422 when the order type cannot be updated at all, the new trigger price would fire immediately at the current market, the trigger has already fired (on a bracket, either leg), the order is pending cancel or already pending an update, or the order is closed — filled, cancelled, expired, or rejected (order is closed and can no longer be updated); 404 when the order does not exist, is not in the API key's portfolio, or the signature does not verify.
Request
- Base URLhttps://flash.definitive.fi/v1
- AuthAPI key in header x-definitive-api-key
Path parameters
Flash order ID.
Request body
Example request
{
"limitNotionalPrice": "4000",
"limitCrossPrice": "4000",
"trigger": {
"notionalPrice": "3500",
"crossPrice": "3500"
},
"triggers": [
{
"notionalPrice": "3500",
"crossPrice": "3500",
"limitPrice": "1774"
}
]
}Response
Order updated successfully
Changes
- info
added the new optional request property
- info
- info
added the new optional request property
- info