Cancel all orders
curl --request DELETE \
--url https://api.sx.bet/orders-v3/all \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/all"
headers = {"x-sx-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-sx-api-key': '<api-key>'}};
fetch('https://api.sx.bet/orders-v3/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.sx.bet/orders-v3/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-sx-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"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/orders-v3/all"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-sx-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sx.bet/orders-v3/all")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-sx-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"cancelledSubmitted": [
{
"orderId": "0x49a35fd509c430cb5e65d3892d9adfb69b6be30ef724bb208ae6ae718f062f9b",
"commandId": "5305bad0-e0ee-4e2e-b2ea-197131b03c8b"
}
]
}
}{
"message": "BAD_AUTH",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Failed to publish cancel command(s) to the orderbook",
"error": "Internal Server Error",
"statusCode": 500
}{
"message": "Service Unavailable",
"statusCode": 503
}Orders
Cancel all orders
Cancel all your open orders across all markets on SX Bet.
DELETE
/
orders-v3
/
all
Cancel all orders
curl --request DELETE \
--url https://api.sx.bet/orders-v3/all \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/all"
headers = {"x-sx-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-sx-api-key': '<api-key>'}};
fetch('https://api.sx.bet/orders-v3/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.sx.bet/orders-v3/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-sx-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"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/orders-v3/all"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-sx-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sx.bet/orders-v3/all")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-sx-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"cancelledSubmitted": [
{
"orderId": "0x49a35fd509c430cb5e65d3892d9adfb69b6be30ef724bb208ae6ae718f062f9b",
"commandId": "5305bad0-e0ee-4e2e-b2ea-197131b03c8b"
}
]
}
}{
"message": "BAD_AUTH",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Failed to publish cancel command(s) to the orderbook",
"error": "Internal Server Error",
"statusCode": 500
}{
"message": "Service Unavailable",
"statusCode": 503
}DELETE /orders-v3/all submits a cancel command for every PENDING or ACTIVE order belonging to
the authenticated address, across every market and event.
This is an asynchronous endpoint. It returns without waiting for cancellation to complete.
The unfilled amount of each order in
cancelledSubmitted will be cancelled; until then, the
order can still fill. See Once a cancel is sent.Last modified on November 9, 2026