Skip to main content
POST
/
session
/
cancelMultiple
Cancel multiple orders
curl --request POST \
  --url https://api.4casters.io/session/cancelMultiple \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionIDs": [
    "65b036dfb31407c2b6bc1cfe",
    "65b036e0b31407c2b6bc1d08"
  ]
}
'
{
  "data": [
    {
      "success": true,
      "reason": "<string>",
      "sessionID": "<string>",
      "description": "<string>",
      "odds": 123,
      "filled": 123,
      "offered": 123,
      "remaining": 123,
      "gameID": "<string>",
      "userReference": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.4casters.io/llms.txt

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

Cancel a batch of orders by id. The result is positional with the input sessionIDs array and may contain a mix of successful cancels and per-order failures.

Request

POST /session/cancelMultiple
sessionIDs
array
required
Array of order ids to cancel. Every id must be a valid ObjectID — if any one of them is malformed the whole request fails with 400.
curl -X POST https://api.4casters.io/session/cancelMultiple \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionIDs": [
      "65b036dfb31407c2b6bc1cfe",
      "65b036e0b31407c2b6bc1d08"
    ]
  }'

Response

data
array
Per-order cancel results. Same shape as Cancel an order. On failure, entries include { success: false, reason: "..." } (no sessionID field for invalid-id / not-found / not-yours rejections).

Example

{
  "data": [
    {
      "success": true,
      "sessionID": "65b036dfb31407c2b6bc1cfe",
      "odds": 125,
      "filled": 0,
      "offered": 0,
      "remaining": 100,
      "gameID": "65f0c3c24ef07d0008abc123"
    },
    { "success": false, "reason": "Not your order" }
  ]
}

Errors

StatusMeaning
400sessionIDs missing or not an array, or any id malformed.

Authorizations

Authorization
string
header
required

Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.

Body

application/json
sessionIDs
string[]
required

Response

Per-order cancel results

data
object[]