Get an orderbook snapshot
curl --request GET \
--url https://api.sx.bet/orderbook-v3/snapshot/market \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orderbook-v3/snapshot/market"
headers = {"x-sx-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-sx-api-key': '<api-key>'}};
fetch('https://api.sx.bet/orderbook-v3/snapshot/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/orderbook-v3/snapshot/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/orderbook-v3/snapshot/market"
req, _ := http.NewRequest("GET", 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.get("https://api.sx.bet/orderbook-v3/snapshot/market")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orderbook-v3/snapshot/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-sx-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"marketHash": "0xbf06c6379c922d8118612d1d7493b20f6df6929437fbf6022904327f9516a2eb",
"outcomeOne": [
{
"percentageOdds": "50000000000000000000",
"size": "1000000"
},
{
"percentageOdds": "40000000000000000000",
"size": "5000000"
}
],
"outcomeTwo": [],
"version": "00100000000000008914000"
}
}{
"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": "Market not found",
"error": "Not Found",
"statusCode": 404
}{
"message": "Service Unavailable",
"statusCode": 503
}Order Book
Get market orderbook snapshot
Get a snapshot of the order book for a market on SX Bet. Requires an API key.
GET
/
orderbook-v3
/
snapshot
/
market
Get an orderbook snapshot
curl --request GET \
--url https://api.sx.bet/orderbook-v3/snapshot/market \
--header 'x-sx-api-key: <api-key>'import requests
url = "https://api.sx.bet/orderbook-v3/snapshot/market"
headers = {"x-sx-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-sx-api-key': '<api-key>'}};
fetch('https://api.sx.bet/orderbook-v3/snapshot/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/orderbook-v3/snapshot/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/orderbook-v3/snapshot/market"
req, _ := http.NewRequest("GET", 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.get("https://api.sx.bet/orderbook-v3/snapshot/market")
.header("x-sx-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/orderbook-v3/snapshot/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-sx-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"marketHash": "0xbf06c6379c922d8118612d1d7493b20f6df6929437fbf6022904327f9516a2eb",
"outcomeOne": [
{
"percentageOdds": "50000000000000000000",
"size": "1000000"
},
{
"percentageOdds": "40000000000000000000",
"size": "5000000"
}
],
"outcomeTwo": [],
"version": "00100000000000008914000"
}
}{
"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": "Market not found",
"error": "Not Found",
"statusCode": 404
}{
"message": "Service Unavailable",
"statusCode": 503
}GET /orderbook-v3/snapshot/market returns the aggregated book for a single market, the same book as the public snapshot. It requires an API key.
Prefer the realtime
orderbook_v3:{marketHash} channel over
polling this endpoint. Use the snapshot once to bootstrap state, then apply stream publications.Use
showTakerPerspective for display only. percentageOdds is from the perspective of the maker. Read the order
book walks the conversion through.Authorizations
API key, sent as the x-sx-api-key header.
Query Parameters
The market hash for which to get the snapshot. For many markets in one call use GET /orders-v3/odds/best, which takes up to 100 hashes but returns only the top level per side.
Return the book from the perspective of someone wanting each outcome, instead of the makers' own: each side's odds are inverted, the sides are swapped, and each size is restated as the taker stake that fully consumes that level. Accepts true/false/1/0, case-insensitively — TRUE and True work. yes, on and an empty value are a 400.
Last modified on October 13, 2026