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, requestsAPI_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())Test Retrieving Balances
Section titled “Test Retrieving Balances”# Get account balancescurl -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.
Verify
Section titled “Verify”200 OKwith 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" }]