Skip to main content
POST
/
v1
/
orders
/
cancel-all
Cancel All Orders
curl --request POST \
  --url https://api.rivermarkets.com/v1/orders/cancel-all \
  --header 'Content-Type: application/json' \
  --header 'X-River-Key-Id: <api-key>' \
  --header 'X-River-Signature: <api-key>' \
  --header 'X-River-Timestamp: <api-key>' \
  --data '
{
  "subaccount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "river_ids": [
    123
  ]
}
'
{
  "cancelled_river_order_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "failed_cancelled_reasons": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.rivermarkets.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-River-Key-Id
string
header
required

UUID of your API key (from Settings → API Keys).

X-River-Timestamp
string
header
required

Current unix seconds. Must be within 30s of server time.

X-River-Signature
string
header
required

Base64 Ed25519 signature over the canonical request: METHOD\nPATH\nSORTED_QUERY\nTIMESTAMP\nSHA256(body) hex. See /api-reference/authentication for the full recipe.

Body

application/json

Request body for cancelling all orders for a subaccount.

subaccount_id
string<uuid>
required
river_ids
integer[] | null

If set, only cancel open orders for these instruments; otherwise cancel all open orders on the subaccount. Must be either omitted/null or a non-empty list.

Response

Successful Response

Schema for cancel order response

cancelled_river_order_ids
string<uuid>[]
required

List of cancelled river order identifiers

failed_cancelled_reasons
Failed Cancelled Reasons · object
required

Dictionary of failed to cancel river order identifiers and reasons