Skip to main content
POST
/
v1
/
orders
/
cancel
Cancel orders
curl --request POST \
  --url https://api.foresight.now/v1/orders/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_hashes": [
    "<string>"
  ],
  "condition_id": "<string>",
  "chain_id": 56
}
'
{
  "cancelled_count": 3,
  "order_hashes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Privy-issued JWT. Required for L1 routes; accepted on L2 routes.

Body

application/json

Three modes, resolved by body shape:

  1. By hashorder_hashes, up to 100 hashes per request.
  2. By filter — any subset of condition_id + chain_id + outcome + side. Filtering by market requires both condition_id and chain_id.
  3. Cancel all — empty body. Cancels the caller's OPEN / PARTIALLY_FILLED orders.
order_hashes
string[]
Maximum array length: 100
condition_id
string
chain_id
integer
Example:

56

outcome
enum<integer>
Available options:
0,
1
side
enum<string>
Available options:
BUY,
SELL

Response

OK

cancelled_count
integer
Example:

3

order_hashes
string[]

Hashes actually cancelled. Individual non-cancellable orders are silently skipped.