List Treasury wallet balances
curl --request GET \
--url https://api.sandbox.rails.wayex.com/v1/treasury/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/balances', 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.sandbox.rails.wayex.com/v1/treasury/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox.rails.wayex.com/v1/treasury/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.rails.wayex.com/v1/treasury/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"clientId": "<string>",
"asset": "AUD",
"posted": "<string>",
"pending": "<string>",
"reserved": "<string>",
"available": "<string>",
"asOf": "2023-11-07T05:31:56Z"
}
]
}Fund and check balance
List Treasury wallet balances
Lists the isolated AUD and stablecoin wallet balances owned by this tenant account.
GET
/
v1
/
treasury
/
balances
List Treasury wallet balances
curl --request GET \
--url https://api.sandbox.rails.wayex.com/v1/treasury/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/balances', 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.sandbox.rails.wayex.com/v1/treasury/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox.rails.wayex.com/v1/treasury/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.rails.wayex.com/v1/treasury/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"clientId": "<string>",
"asset": "AUD",
"posted": "<string>",
"pending": "<string>",
"reserved": "<string>",
"available": "<string>",
"asOf": "2023-11-07T05:31:56Z"
}
]
}What this endpoint does
Lists the isolated AUD and stablecoin wallet balances owned by this tenant account.When to use it
Use it before previews and to display available, reserved, pending, and posted amounts with theirasOf time (posted is available plus reserved; pending is excluded).
Before you call
Authenticate withtreasury:read. A different tenant login or API key reads a different wallet and cannot net or spend this balance.
Money and balance effect
This is a read-only request. It does not reserve, debit, credit, or settle money.States and completion
Onlyavailable is spendable. reserved backs accepted operations; pending is detected but not yet usable. Stale or unavailable balance data must not be treated as zero.
Safe retries
GET requests are read-only and may be retried with normal exponential backoff. Do not send anIdempotency-Key.
Read Funding and balances for the complete workflow.
