// Requires an authenticated client.
use xo_orderbook_client::orderbook::types::request::BalanceAllowanceRequest;
let resp = client
.balance_allowance(BalanceAllowanceRequest::default())
.await?;
println!("balance={}, allowance={}", resp.balance, resp.allowance);
curl --request GET \
--url https://orderbooks.xo.market/balance-allowanceimport requests
url = "https://orderbooks.xo.market/balance-allowance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/balance-allowance', 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/balance-allowance",
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/balance-allowance"
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/balance-allowance")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/balance-allowance")
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{
"balance": "12345678",
"allowance": "10000000",
"smart_account": "CAFE000000000000000000000000000000000A11"
}Get balance & allowance
Inspect maker balance and exchange allowance. Note: XO does not
currently split balances by asset_type / token_id — those
fields are accepted for CLOB SDK wire compat but ignored. The
response always reflects USDC collateral.
// Requires an authenticated client.
use xo_orderbook_client::orderbook::types::request::BalanceAllowanceRequest;
let resp = client
.balance_allowance(BalanceAllowanceRequest::default())
.await?;
println!("balance={}, allowance={}", resp.balance, resp.allowance);
curl --request GET \
--url https://orderbooks.xo.market/balance-allowanceimport requests
url = "https://orderbooks.xo.market/balance-allowance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/balance-allowance', 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/balance-allowance",
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/balance-allowance"
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/balance-allowance")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/balance-allowance")
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{
"balance": "12345678",
"allowance": "10000000",
"smart_account": "CAFE000000000000000000000000000000000A11"
}Query Parameters
COLLATERAL, CONDITIONAL required when asset_type=CONDITIONAL (currently ignored on XO)
Response
OK
USDC cash balance in micro-units, decimal string. (XO does
not currently honour asset_type=CONDITIONAL — see endpoint
description.)
Available cash after open-order reservations, decimal-string
micro-USDC. balance - allowance is the amount earmarked
against resting BUY orders.
User's smart-account address as hex without 0x prefix
(e.g. "CAFE000000000000000000000000000000000A11").
null for plain EOA users with no smart account. XO-only
field — not part of the canonical CLOB wire contract.