xo-orderbook-client-rs
use xo_orderbook_client::orderbook::{Client, Config};
let client = Client::new("https://orderbooks.xo.market", Config::default())?;
let page = client.simplified_markets(None).await?;
curl --request GET \
--url https://orderbooks.xo.market/simplified-marketsimport requests
url = "https://orderbooks.xo.market/simplified-markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/simplified-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{
"limit": 100,
"count": 1,
"next_cursor": "LTE=",
"data": [
{
"condition_id": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"tokens": [
{
"token_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"outcome": "Yes",
"price": "0.5"
},
{
"token_id": "13730057904096984444199595880113152612639388204530324084054099203558669491245",
"outcome": "No",
"price": "0.5"
}
],
"minimum_tick_size": 0.001,
"neg_risk": false,
"active": true
}
]
}Markets
List simplified markets
Same response shape as /markets; provided for SDK parity.
GET
/
simplified-markets
xo-orderbook-client-rs
use xo_orderbook_client::orderbook::{Client, Config};
let client = Client::new("https://orderbooks.xo.market", Config::default())?;
let page = client.simplified_markets(None).await?;
curl --request GET \
--url https://orderbooks.xo.market/simplified-marketsimport requests
url = "https://orderbooks.xo.market/simplified-markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-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://orderbooks.xo.market/simplified-markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/simplified-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{
"limit": 100,
"count": 1,
"next_cursor": "LTE=",
"data": [
{
"condition_id": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"tokens": [
{
"token_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"outcome": "Yes",
"price": "0.5"
},
{
"token_id": "13730057904096984444199595880113152612639388204530324084054099203558669491245",
"outcome": "No",
"price": "0.5"
}
],
"minimum_tick_size": 0.001,
"neg_risk": false,
"active": true
}
]
}Response
200 - application/json
OK
Show child attributes
Show child attributes
Base64-encoded offset cursor. Pass back as next_cursor on the
next request. The literal string "LTE=" is the canonical
CLOB end-of-stream sentinel — when the gateway returns it,
there are no more pages. Empty string is also accepted by
SDKs for first-page requests. NOT nullable — always a string.
Number of items in this page (may equal limit mid-stream, smaller on the final page).
Page size requested (default 100, max 500).