Cancel orders in batch
Changed onCancel up to 25 flash orders with one funder signature. Returns 200 with one result per order id, in request order; partial success is reported per order, never as a whole-call failure.
Signature required. Construct the canonical UTF-8 batch cancel message and sign it with the funder wallet:
- Message format: "Definitive Flash v1 — Cancel Orders\nOrders:\n<orderId>\n<orderId>..." — one lowercase UUID per line, in the same order as orderIds, no trailing newline. Identical bytes across EVM and SVM; only the signing primitive differs.
- 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 cancelMessage.
One wallet per batch: ids the signer does not fund come back NOT_FOUND and the rest proceed. A userSignature that is not valid hex or base58 is rejected with 400 INVALID_SIGNATURE before any lookup; a well-formed signature that fails to verify is reported per order as NOT_FOUND, never as a 4xx.
Each result mirrors single cancel: ok: true for a fresh or already-cancelled order; otherwise ok: false with an errorCode standing in for the status single cancel would have returned. PENDING_CANCEL means a cancel is already in flight — treat it as cancelled and confirm via GET /orders/{orderId}.
Cancelling an entry order never cancels its attached bracket pair; include the bracket's own id to cancel it.
Request
- Base URLhttps://flash.definitive.fi/v1
- AuthAPI key in header x-definitive-api-key
Request body
Response
Per-order results, in request order
Example response
{
"results": [
{
"errorCode": "ALREADY_FILLED"
}
]
}Changes
- info
endpoint added
- info