Cancel working orders
curl --request POST \
--url https://api.apexiumbet.com/v1/orders/cancel-all \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fixtureId": "<string>",
"orderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cursor": "<string>"
}
'import requests
url = "https://api.apexiumbet.com/v1/orders/cancel-all"
payload = {
"fixtureId": "<string>",
"orderIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cursor": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fixtureId: '<string>',
orderIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cursor: '<string>'
})
};
fetch('https://api.apexiumbet.com/v1/orders/cancel-all', 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.apexiumbet.com/v1/orders/cancel-all",
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([
'fixtureId' => '<string>',
'orderIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.apexiumbet.com/v1/orders/cancel-all"
payload := strings.NewReader("{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.apexiumbet.com/v1/orders/cancel-all")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apexiumbet.com/v1/orders/cancel-all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"remainder": "cancelled",
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
},
"cancellation": "cancelled"
}
]
}
],
"notFound": [
"<string>"
],
"busy": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"nextCursor": "<string>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}Orders
Cancel working orders
Cancels the working orders of the account, of one fixture, or the listed orders. One call handles at most 200 orders: while nextCursor is not null, call again with it to continue. Listed ids that match no order of the account (under fixtureId when given) come back in notFound. Orders busy with a placement come back in busy: cancel them again shortly. Not counted against any per-key rate limit.
POST
/
v1
/
orders
/
cancel-all
Cancel working orders
curl --request POST \
--url https://api.apexiumbet.com/v1/orders/cancel-all \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fixtureId": "<string>",
"orderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cursor": "<string>"
}
'import requests
url = "https://api.apexiumbet.com/v1/orders/cancel-all"
payload = {
"fixtureId": "<string>",
"orderIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cursor": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fixtureId: '<string>',
orderIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cursor: '<string>'
})
};
fetch('https://api.apexiumbet.com/v1/orders/cancel-all', 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.apexiumbet.com/v1/orders/cancel-all",
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([
'fixtureId' => '<string>',
'orderIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.apexiumbet.com/v1/orders/cancel-all"
payload := strings.NewReader("{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.apexiumbet.com/v1/orders/cancel-all")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apexiumbet.com/v1/orders/cancel-all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fixtureId\": \"<string>\",\n \"orderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"remainder": "cancelled",
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
},
"cancellation": "cancelled"
}
]
}
],
"notFound": [
"<string>"
],
"busy": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"nextCursor": "<string>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}Body
application/json