Cancel orders on a market
curl --request DELETE \
--url https://api.sx.bet/orders-v3/market \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/market"
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/market', 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/market",
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/market"
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/market")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/market")
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"
}
],
"hasMore": false
}
}{
"message": [
"marketHash must be a valid hex string of length 32 bytes"
],
"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 market
Cancel all your open orders on a single market on SX Bet.
DELETE
/
orders-v3
/
market
Cancel orders on a market
curl --request DELETE \
--url https://api.sx.bet/orders-v3/market \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/market"
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/market', 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/market",
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/market"
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/market")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/market")
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"
}
],
"hasMore": false
}
}{
"message": [
"marketHash must be a valid hex string of length 32 bytes"
],
"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/market submits a cancel command for every PENDING or ACTIVE order you hold on a
single market, across both outcomes. For anything finer than a market — one side, one price level —
name the ids on DELETE /orders-v3.
This is an asynchronous endpoint — a
200 means submitted, not cancelled. The route publishes
cancel commands and returns without waiting for a response, so your orders are still on the
book when the response arrives. Confirm with
GET /orders-v3?marketHash=… or watch
account:orders_v3_#{address} before acting on the result.Last modified on September 14, 2026