Cancel all orders for a game
curl --request POST \
--url https://api.4casters.io/session/cancelAllOrdersForGame \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"gameID": "688c0516fbc14da0c202d426",
"type": "spread"
}
'import requests
url = "https://api.4casters.io/session/cancelAllOrdersForGame"
payload = {
"gameID": "688c0516fbc14da0c202d426",
"type": "spread"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({gameID: '688c0516fbc14da0c202d426', type: 'spread'})
};
fetch('https://api.4casters.io/session/cancelAllOrdersForGame', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.4casters.io/session/cancelAllOrdersForGame",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'gameID' => '688c0516fbc14da0c202d426',
'type' => 'spread'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.4casters.io/session/cancelAllOrdersForGame"
payload := strings.NewReader("{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.4casters.io/session/cancelAllOrdersForGame")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/session/cancelAllOrdersForGame")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"success": true,
"reason": "<string>",
"sessionID": "<string>",
"description": "<string>",
"odds": 123,
"filled": 123,
"offered": 123,
"remaining": 123,
"gameID": "<string>",
"userReference": "<string>"
}
]
}Orders
Cancel all orders for a game
Cancel every open order on a single game
POST
/
session
/
cancelAllOrdersForGame
Cancel all orders for a game
curl --request POST \
--url https://api.4casters.io/session/cancelAllOrdersForGame \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"gameID": "688c0516fbc14da0c202d426",
"type": "spread"
}
'import requests
url = "https://api.4casters.io/session/cancelAllOrdersForGame"
payload = {
"gameID": "688c0516fbc14da0c202d426",
"type": "spread"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({gameID: '688c0516fbc14da0c202d426', type: 'spread'})
};
fetch('https://api.4casters.io/session/cancelAllOrdersForGame', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.4casters.io/session/cancelAllOrdersForGame",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'gameID' => '688c0516fbc14da0c202d426',
'type' => 'spread'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.4casters.io/session/cancelAllOrdersForGame"
payload := strings.NewReader("{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.4casters.io/session/cancelAllOrdersForGame")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/session/cancelAllOrdersForGame")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gameID\": \"688c0516fbc14da0c202d426\",\n \"type\": \"spread\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"success": true,
"reason": "<string>",
"sessionID": "<string>",
"description": "<string>",
"odds": 123,
"filled": 123,
"offered": 123,
"remaining": 123,
"gameID": "<string>",
"userReference": "<string>"
}
]
}Cancel every open order on a single game. Optionally restrict to a single market
type to leave other markets in place.
Request
POST /session/cancelAllOrdersForGame
string
required
The game whose orders should be cancelled.
string
Optional. Cancel only orders of this market type — one of
moneyline, spread, total. When omitted, all market types are cancelled.curl -X POST https://api.4casters.io/session/cancelAllOrdersForGame \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"gameID": "688c0516fbc14da0c202d426",
"type": "spread"
}'
curl -X POST https://api.4casters.io/session/cancelAllOrdersForGame \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "gameID": "688c0516fbc14da0c202d426" }'
Response
array
Per-order cancel results. Same shape as Cancel an order.
Errors
| Status | Meaning |
|---|---|
400 | gameID missing / invalid, or type is not one of the allowed values. |
Authorizations
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
Response
Per-order cancel results
Show child attributes
Show child attributes
Was this page helpful?
⌘I