---
title: "Cancel an order"
method: POST
path: "/orders/{orderId}/cancel"
tags: ["Flash"]
---

# Cancel an order

`POST /orders/{orderId}/cancel`

Cancel a previously submitted flash order.

**Signature required.** Construct the canonical UTF-8 cancel message and sign it with the funder wallet:

- Message format: `"Definitive Flash v1 — Cancel Order\nOrder: <orderId>"` — 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`.

Idempotent: cancelling an already-cancelled order returns 200, not 422.

## Path parameters

- `orderId` string, uuid, required — Flash order ID.

## Request body

- CancelOrderRequest
  - `cancelMessage` string, required — UTF-8 plaintext the funder wallet signed. Format: "Definitive Flash v1 — Cancel Order\nOrder: <orderId>". Same bytes across EVM and SVM.
  - `userSignature` string, required — Funder 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.

## Response `200`

Order cancelled (or already cancelled)

- CancelOrderResponse
  - `ok` true, required

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed
- `403` — Permission denied
- `404` — Resource not found
- `422` — Resource state prevents the requested operation
- `429` — Rate limit exceeded
- `500` — Internal server error
- `503` — Service temporarily unavailable
- `504` — Gateway timeout

---

[API](https://skmtc.net/definitive/apis/definitive-flash-api.md) · [All operations](https://skmtc.net/definitive/apis/definitive-flash-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/definitive/definitive-flash-api/versions/4b43a78e1989/schema)
