List markets
curl --request GET \
--url https://api-mainnet.xo.market/api/marketsimport requests
url = "https://api-mainnet.xo.market/api/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-mainnet.xo.market/api/markets', 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-mainnet.xo.market/api/markets",
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-mainnet.xo.market/api/markets"
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-mainnet.xo.market/api/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-mainnet.xo.market/api/markets")
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{
"data": [
{
"id": 482,
"contractMarketId": "<string>",
"conditionId": "<string>",
"marketContractAddress": "<string>",
"versionId": 123,
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"rules": {},
"category": [
{
"id": 7,
"name": "SPORTS"
}
],
"tags": [
"<string>"
],
"type": 0,
"status": "PENDING",
"startsAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"totalVolume": "<string>",
"totalVolumeInUSD": "<string>",
"collateralTokenId": 3,
"imageUrl": "<string>",
"metadataUri": "<string>",
"winningOutcomeId": 123,
"outcomes": [
{
"id": 123,
"title": "YES",
"tokenId": "1234567890123456789012345678901234567890",
"position": 0
}
],
"visible": true,
"isFeatured": true
}
],
"meta": {
"page": 1,
"take": 10,
"itemCount": 137,
"pageCount": 14,
"hasPreviousPage": false,
"hasNextPage": true
}
}Markets
List markets
Returns a paginated list of markets with optional filters. Use
marketScope to constrain by deployment type (CLOB only, Pulse
only, etc.) or pass marketType directly.
GET
/
markets
List markets
curl --request GET \
--url https://api-mainnet.xo.market/api/marketsimport requests
url = "https://api-mainnet.xo.market/api/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-mainnet.xo.market/api/markets', 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-mainnet.xo.market/api/markets",
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-mainnet.xo.market/api/markets"
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-mainnet.xo.market/api/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-mainnet.xo.market/api/markets")
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{
"data": [
{
"id": 482,
"contractMarketId": "<string>",
"conditionId": "<string>",
"marketContractAddress": "<string>",
"versionId": 123,
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"rules": {},
"category": [
{
"id": 7,
"name": "SPORTS"
}
],
"tags": [
"<string>"
],
"type": 0,
"status": "PENDING",
"startsAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"totalVolume": "<string>",
"totalVolumeInUSD": "<string>",
"collateralTokenId": 3,
"imageUrl": "<string>",
"metadataUri": "<string>",
"winningOutcomeId": 123,
"outcomes": [
{
"id": 123,
"title": "YES",
"tokenId": "1234567890123456789012345678901234567890",
"position": 0
}
],
"visible": true,
"isFeatured": true
}
],
"meta": {
"page": 1,
"take": 10,
"itemCount": 137,
"pageCount": 14,
"hasPreviousPage": false,
"hasNextPage": true
}
}Query Parameters
Page number (1-indexed).
Required range:
x >= 1Page size for /markets style endpoints.
Required range:
1 <= x <= 1000Full-text search over the market title.
Convenience filter over deployment types
(IXOMarketV1.MarketType):
default= STANDARD (0) + CLOB (2)withClob= STANDARD + CLOB + CLOB_PULSEwithPulse= allonlyPulse= PULSE (1)onlyClobPulse= CLOB_PULSE (3)onlyClob= CLOB + CLOB_PULSE
Available options:
default, withClob, withPulse, onlyPulse, onlyClobPulse, onlyClob Comma-separated direct type override: 0=STANDARD, 1=PULSE,
2=CLOB, 3=CLOB_PULSE. Overrides marketScope when set.
Example:
"1,3"
Comma-separated statuses. Includes MarketStatus values plus
the special tokens CLOSING_24H and EXPIRED.
Example:
"ACTIVE,CLOSING_24H"
Example:
"SPORTS,TECHNOLOGY"
Available options:
createdAt, expiresAt, totalVolume, liquidity, priorityScore, conviction, endingSoon, totalVolumeInUSD Available options:
ASC, DESC