Skip to main content
POST
/
session
/
cancel
Cancel a single order
curl --request POST \
  --url https://api.4casters.io/session/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionID": "65b036dfb31407c2b6bc1cfe"
}
'
{
  "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 single open order by id. Returns the unfilled and filled amounts at cancellation time.

Request

POST /session/cancel
sessionID
string
required
Order id to cancel.
curl -X POST https://api.4casters.io/session/cancel \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sessionID": "65b036dfb31407c2b6bc1cfe"}'

Response

data
object

Example

{
  "data": {
    "success": true,
    "sessionID": "65b036dfb31407c2b6bc1cfe",
    "description": "Lakers ML +125",
    "odds": 125,
    "filled": 0,
    "offered": 0,
    "remaining": 100,
    "gameID": "65f0c3c24ef07d0008abc123",
    "userReference": "my-order-1"
  }
}

Errors

StatusMeaning
400Invalid order id.
403Not your order.
409Order could not be cancelled (e.g. already fully filled).

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

Order id to cancel.

Response

Cancel result

data
object