curl --request GET \
--url https://api.sx.bet/markets/activeimport requests
url = "https://api.sx.bet/markets/active"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sx.bet/markets/active', 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/markets/active",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/markets/active"
req, _ := http.NewRequest("GET", url, nil)
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/markets/active")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/markets/active")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"markets": [
{
"status": "ACTIVE",
"marketHash": "0x8120ae9408cd7556246473be7ceada8cba47d42418cce31ffad0b67b196e3218",
"outcomeOneName": "Golden State Warriors",
"outcomeTwoName": "Minnesota Timberwolves",
"outcomeVoidName": "NO_CONTEST",
"teamOneName": "Golden State Warriors",
"teamTwoName": "Minnesota Timberwolves",
"type": 226,
"gameTime": 1773453600,
"sportXeventId": "L18272456",
"liveEnabled": true,
"sportLabel": "Basketball",
"sportId": 1,
"leagueId": 1,
"leagueLabel": "NBA",
"group1": "NBA",
"chainVersion": "SXR",
"participantOneId": 15002,
"participantTwoId": 14999,
"__type": "Market"
},
{
"status": "ACTIVE",
"marketHash": "0x531e9e6d6469f6323d464340e91840b3666e4e43cf04b8c2a52c2ac0d67839fb",
"outcomeOneName": "Golden State Warriors +6.5",
"outcomeTwoName": "Minnesota Timberwolves -6.5",
"outcomeVoidName": "NO_GAME_OR_EVEN",
"teamOneName": "Golden State Warriors",
"teamTwoName": "Minnesota Timberwolves",
"type": 342,
"gameTime": 1773453600,
"line": 6.5,
"sportXeventId": "L18272456",
"liveEnabled": true,
"sportLabel": "Basketball",
"sportId": 1,
"leagueId": 1,
"leagueLabel": "NBA",
"group1": "NBA",
"chainVersion": "SXR",
"participantOneId": 15002,
"participantTwoId": 14999,
"mainLine": true,
"__type": "Market"
}
],
"nextKey": "60c7b8f54da0ad001aa3261c"
}
}Active markets
Retrieve all active betting markets on the SX Bet exchange, with filters for sport, league, and event.
curl --request GET \
--url https://api.sx.bet/markets/activeimport requests
url = "https://api.sx.bet/markets/active"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sx.bet/markets/active', 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/markets/active",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/markets/active"
req, _ := http.NewRequest("GET", url, nil)
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/markets/active")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/markets/active")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"markets": [
{
"status": "ACTIVE",
"marketHash": "0x8120ae9408cd7556246473be7ceada8cba47d42418cce31ffad0b67b196e3218",
"outcomeOneName": "Golden State Warriors",
"outcomeTwoName": "Minnesota Timberwolves",
"outcomeVoidName": "NO_CONTEST",
"teamOneName": "Golden State Warriors",
"teamTwoName": "Minnesota Timberwolves",
"type": 226,
"gameTime": 1773453600,
"sportXeventId": "L18272456",
"liveEnabled": true,
"sportLabel": "Basketball",
"sportId": 1,
"leagueId": 1,
"leagueLabel": "NBA",
"group1": "NBA",
"chainVersion": "SXR",
"participantOneId": 15002,
"participantTwoId": 14999,
"__type": "Market"
},
{
"status": "ACTIVE",
"marketHash": "0x531e9e6d6469f6323d464340e91840b3666e4e43cf04b8c2a52c2ac0d67839fb",
"outcomeOneName": "Golden State Warriors +6.5",
"outcomeTwoName": "Minnesota Timberwolves -6.5",
"outcomeVoidName": "NO_GAME_OR_EVEN",
"teamOneName": "Golden State Warriors",
"teamTwoName": "Minnesota Timberwolves",
"type": 342,
"gameTime": 1773453600,
"line": 6.5,
"sportXeventId": "L18272456",
"liveEnabled": true,
"sportLabel": "Basketball",
"sportId": 1,
"leagueId": 1,
"leagueLabel": "NBA",
"group1": "NBA",
"chainVersion": "SXR",
"participantOneId": 15002,
"participantTwoId": 14999,
"mainLine": true,
"__type": "Market"
}
],
"nextKey": "60c7b8f54da0ad001aa3261c"
}
}GET /orderbook-v3/snapshot type and betGroup can be present. Not both.Query Parameters
Return only the main line for market types that have lines. See Markets and events for how types without lines are affected.
If set, it will only include markets for a particular sportXeventId. Pass the full sportXeventId, including the provider letter, for example L12003787
If set, it will only include markets for a particular league ID
If set, it will only include markets for particular sport IDs (comma separated)
If set, it will only include markets that are currently available for in-play betting
If set, it will only include markets for a particular bet group
Comma-separated market type ids. See Market types for the list
Pass the previous response's nextKey as paginationKey to get the next page.
Used for pagination. Requested page size. Each call will only return up to this amount of records. Maximum of 100
If set, only return markets for games starting at or after this UNIX timestamp