Cancel orders on an event
curl --request DELETE \
--url https://api.sx.bet/orders-v3/event \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/event"
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/event', 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/event",
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/event"
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/event")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/event")
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": [
"eventId should not be empty",
"eventId must be a string"
],
"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 event
Cancel all your open orders for a specific event on SX Bet.
DELETE
/
orders-v3
/
event
Cancel orders on an event
curl --request DELETE \
--url https://api.sx.bet/orders-v3/event \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orders-v3/event"
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/event', 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/event",
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/event"
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/event")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orders-v3/event")
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": [
"eventId should not be empty",
"eventId must be a string"
],
"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/event submits a cancel command for every PENDING or ACTIVE order you hold on a
single event, across all of that event’s markets and both outcomes. For anything finer than an event — one market, one
side, one price level — name the ids on DELETE /orders-v3; there
is no cancel-by-market route.
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?eventId=… or watch
account:orders_v3_#{address} before acting on the result.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.
Query Parameters
Event ID to cancel orders for.
Last modified on August 11, 2026
⌘I