Skip to main content
POST
Cancel existing order

Authorizations

X-Monaco-Signature
string
header
required

Ed25519 session-key request signing. Every authenticated request carries three headers: X-Monaco-PublicKey (64-char lowercase-hex session public key), X-Monaco-Timestamp (Unix milliseconds, within 30s of server time), and X-Monaco-Signature (hex ed25519 signature). The signature is over METHOD\npath?query\ntimestamp_ms\nSHA256_hex(body), where the body hash is the SHA-256 of the empty byte string when there is no body. Obtain the session keypair from POST /api/v1/auth/challenge followed by POST /api/v1/auth/verify.

Body

application/json
orderId
string<uuid>
required

Order UUID to cancel

Example:

"123e4567-e89b-12d3-a456-426614174000"

remainingQuantityTarget
string | null

Partial cancel: reduce the resting order in place to this remaining quantity, keeping its queue position. A target ("leave this much resting"), not an amount to remove, so a retried request converges. Must be a positive multiple of the market's quantity step, strictly below the order's current remaining quantity; the delta is released exactly as a cancel releases it (spot unlock / margin reserve). Omit for a full cancel.

Example:

"0.5"

Response

OK

orderId
string<uuid> | null

Cancelled order UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

status
string | null

Result status: SUCCESS or FAILED

Example:

"SUCCESS"

message
string | null

Human-readable status message

Example:

"Order cancelled successfully"