Skip to content

Retrieving Balances

TypeScript / JavaScript

const res = await fetch(`${process.env.API_BASE}/v1/account/balances`, {
headers: { "X-API-Key": process.env.API_KEY! }
});
console.log(await res.json());

Python

import os, requests
API_BASE, API_KEY = os.getenv("API_BASE"), os.getenv("API_KEY")
r = requests.get(f"{API_BASE}/v1/account/balances",
headers={"X-API-Key": API_KEY})
print(r.json())
Terminal window
# Get account balances
curl -X GET "$API_BASE/v1/account/balances" \
-H "X-API-Key: $API_KEY"

Tip: Expect a list of assets with available, hold, and total.
Use X-Request-Id in headers to trace calls in logs.

  • 200 OK with a JSON list of assets
  • Example:
    [
    { "asset": "USD", "available": "1000.00", "hold": "0", "total": "1000.00" },
    { "asset": "BTC", "available": "0.05", "hold": "0.01", "total": "0.06" }
    ]