xo-orderbook-client-rs
// XO-only endpoint — no dedicated SDK method. Hit it directly via reqwest.
use serde::Deserialize;
#[derive(Deserialize)]
struct ClaimableResponse {
address: String,
claimable: Vec<ClaimableEntry>,
}
#[derive(Deserialize)]
struct ClaimableEntry {
market_id: String,
outcome: String,
token_id: String,
balance: String,
refund_reason: String, // "resolved_winner" | "voided_refund"
}
let resp: ClaimableResponse = reqwest::Client::new()
.get(format!("{}/claimable", client.host()))
.query(&[("address", "0xCAFE000000000000000000000000000000000A11")])
.send().await?
.json().await?;
curl --request GET \
--url https://orderbooks.xo.market/claimableimport requests
url = "https://orderbooks.xo.market/claimable"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/claimable', 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/claimable",
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/claimable"
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/claimable")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/claimable")
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{
"address": "0xCAFE000000000000000000000000000000000A11",
"claimable": [
{
"market_id": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"outcome": "Yes",
"token_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"balance": "50000000",
"refund_reason": "resolved_winner"
}
]
}Account
Get claimable positions
Settled positions awaiting on-chain claim. refund_reason
distinguishes Resolved-winner redemptions (resolved_winner)
from Voided-market refunds (voided_refund) — the on-chain
redeemPositions call is identical in either case. Submit it
as an ERC-4337 UserOperation through the XO bundler (Redeem
positions guide).
GET
/
claimable
xo-orderbook-client-rs
// XO-only endpoint — no dedicated SDK method. Hit it directly via reqwest.
use serde::Deserialize;
#[derive(Deserialize)]
struct ClaimableResponse {
address: String,
claimable: Vec<ClaimableEntry>,
}
#[derive(Deserialize)]
struct ClaimableEntry {
market_id: String,
outcome: String,
token_id: String,
balance: String,
refund_reason: String, // "resolved_winner" | "voided_refund"
}
let resp: ClaimableResponse = reqwest::Client::new()
.get(format!("{}/claimable", client.host()))
.query(&[("address", "0xCAFE000000000000000000000000000000000A11")])
.send().await?
.json().await?;
curl --request GET \
--url https://orderbooks.xo.market/claimableimport requests
url = "https://orderbooks.xo.market/claimable"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/claimable', 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/claimable",
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/claimable"
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/claimable")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/claimable")
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{
"address": "0xCAFE000000000000000000000000000000000A11",
"claimable": [
{
"market_id": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"outcome": "Yes",
"token_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"balance": "50000000",
"refund_reason": "resolved_winner"
}
]
}