Cancel orders by id
curl --request DELETE \
--url https://api.sx.bet/orders-v3 \
--header 'Content-Type: application/json' \
--header 'x-sx-api-key: <api-key>' \
--data '
{
"orders": [
{
"orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76"
}
]
}
'import requests
url = "https://api.sx.bet/orders-v3"
payload = { "orders": [{ "orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76" }] }
headers = {
"x-sx-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-sx-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orders: [
{orderId: '0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76'}
]
})
};
fetch('https://api.sx.bet/orders-v3', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'orders' => [
[
'orderId' => '0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/orders-v3"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-sx-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.delete("https://api.sx.bet/orders-v3")
.header("x-sx-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"cancelled": [
{
"orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76",
"commandId": "74a01fe8-6555-4492-8d28-879c151aef8b"
}
],
"notCancelled": [
{
"orderId": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"reason": "NOT_FOUND"
}
],
"unconfirmed": []
}
}{
"message": [
"orders must be an array"
],
"error": "Bad Request",
"statusCode": 400
}{
"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 orders by id
Cancel specific open orders by order id on the SX Bet exchange.
DELETE
/
orders-v3
Cancel orders by id
curl --request DELETE \
--url https://api.sx.bet/orders-v3 \
--header 'Content-Type: application/json' \
--header 'x-sx-api-key: <api-key>' \
--data '
{
"orders": [
{
"orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76"
}
]
}
'import requests
url = "https://api.sx.bet/orders-v3"
payload = { "orders": [{ "orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76" }] }
headers = {
"x-sx-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-sx-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orders: [
{orderId: '0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76'}
]
})
};
fetch('https://api.sx.bet/orders-v3', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'orders' => [
[
'orderId' => '0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/orders-v3"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-sx-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.delete("https://api.sx.bet/orders-v3")
.header("x-sx-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"orderId\": \"0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"cancelled": [
{
"orderId": "0x0e9e6910f10e0aced2059f2736011c05b9a9cf5c587d150f3b413159560c7a76",
"commandId": "74a01fe8-6555-4492-8d28-879c151aef8b"
}
],
"notCancelled": [
{
"orderId": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"reason": "NOT_FOUND"
}
],
"unconfirmed": []
}
}{
"message": [
"orders must be an array"
],
"error": "Bad Request",
"statusCode": 400
}{
"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 cancels orders you name by id, and is the only cancel route that reports a
per-order outcome. This is a synchronous endpoint.
The HTTP status is not the cancel outcome This route returns
200 whether or not
anything was cancelled. An id you do not own, an id that no longer exists, and an id you already
cancelled all arrive as 200 with the order in notCancelled.There is a 5-second confirmation timeout. Orders that report in time land in
cancelled or notCancelled; any that do not report before the timeout come back in the
unconfirmed bucket. unconfirmed does not mean the cancel failed — the command was still
submitted and usually takes effect shortly after. Re-read
GET /orders-v3 to confirm, rather than assuming either outcome.At most
limits.maxCancelOrders ids per request (100 today). Read the cap from
GET /metadata/obv3; exceeding it is a 400. To cancel every
order at once, use DELETE /orders-v3/all instead of paging
ids through this route.Authorizations
API key, sent as the x-sx-api-key header. Generate one from the API keys section of your account page on sx.bet.
Body
application/json
An array of objects, each with an orderId — {orders: [{orderId}]}. At most limits.maxCancelOrders unique items (100 today). An empty array is valid and does nothing. Duplicate ids are collapsed server-side: a repeated id is cancelled once and appears once in the response, and the cap counts unique ids.
Show child attributes
Show child attributes
Last modified on August 11, 2026
⌘I