Skip to main content
POST
/
session
/
cancelAllForLeague
Cancel all orders for a league
curl --request POST \
  --url https://api.4casters.io/session/cancelAllForLeague \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "league": "NBA"
}
'
{
  "data": {
    "ordersReceived": true
  }
}

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.

Schedule cancellation of every open order in a league. This endpoint dispatches asynchronously — it acknowledges with { ordersReceived: true } immediately and the cancels happen in the background. If you need to know which orders were cancelled, follow up with Get unmatched orders or subscribe to the user feed on the WebSocket Streaming API.

Request

POST /session/cancelAllForLeague
league
string
required
League code. Get the list from GET /exchange/getLeagues. Case-insensitive.
curl -X POST https://api.4casters.io/session/cancelAllForLeague \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "league": "NBA" }'

Response

data.ordersReceived
boolean
Always true on success. The cancellations are processed asynchronously.

Example

{ "data": { "ordersReceived": true } }

Errors

StatusMeaning
400league missing, not a string, or unknown.

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
league
string
required

League code from GET /exchange/getLeagues. Case-insensitive.

Response

Cancellation request accepted

data
object