curl --request POST \
--url https://flash.definitive.fi/v1/orders/cancel \
--header 'Content-Type: application/json' \
--header 'x-definitive-api-key: <api-key>' \
--data '
{
"orderIds": [
"<string>"
],
"cancelMessage": "<string>",
"userSignature": "<string>"
}
'import requests
url = "https://flash.definitive.fi/v1/orders/cancel"
payload = {
"orderIds": ["<string>"],
"cancelMessage": "<string>",
"userSignature": "<string>"
}
headers = {
"x-definitive-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-definitive-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderIds: ['<string>'], cancelMessage: '<string>', userSignature: '<string>'})
};
fetch('https://flash.definitive.fi/v1/orders/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"orderId": "<string>",
"ok": true,
"errorCode": "ALREADY_FILLED"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Cancel orders in batch
Cancel 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 asorderIds, no trailing newline. Identical bytes across EVM and SVM; only the signing primitive differs. - EVM chains — sign with EIP-191
personal_signover the message bytes; pass the 65-byte 0x-prefixed hex signature asuserSignature. - SVM (
solana) — sign with Ed25519 over the message bytes; pass the 64-byte base58 signature asuserSignature. - 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.
curl --request POST \
--url https://flash.definitive.fi/v1/orders/cancel \
--header 'Content-Type: application/json' \
--header 'x-definitive-api-key: <api-key>' \
--data '
{
"orderIds": [
"<string>"
],
"cancelMessage": "<string>",
"userSignature": "<string>"
}
'import requests
url = "https://flash.definitive.fi/v1/orders/cancel"
payload = {
"orderIds": ["<string>"],
"cancelMessage": "<string>",
"userSignature": "<string>"
}
headers = {
"x-definitive-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-definitive-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderIds: ['<string>'], cancelMessage: '<string>', userSignature: '<string>'})
};
fetch('https://flash.definitive.fi/v1/orders/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"orderId": "<string>",
"ok": true,
"errorCode": "ALREADY_FILLED"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Authorizations
Your Definitive API key.
Body
1–25 order ids to cancel, as lowercase hyphenated UUIDs, in the same order as the lines of cancelMessage. Duplicates are rejected.
1 - 25 elements^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$UTF-8 plaintext the funder wallet signed. Format: "Definitive Flash v1 — Cancel Orders\nOrders:\n\n..." — one lowercase UUID per line in orderIds order, no trailing newline. Same bytes across EVM and SVM.
1Funder wallet signature over cancelMessage. Accepts 0x-prefixed hex (EVM convention) or base58 (Solana convention). EVM: 65 bytes from EIP-191 personal_sign. SVM: 64 bytes from Ed25519.
1Response
Per-order results, in request order
One result per requested order id, in request order.
Show child attributes
Show child attributes