SDK Reference/getBalance()
getBalance()
Returns the current balance of the agent wallet, broken down by available, reserved, and total.
Signature
client.getBalance(): Promise<Balance>Returns
| Field | Type | Description |
|---|---|---|
| available | number | Spendable balance in USD cents |
| reserved | number | Balance reserved by active cards |
| total | number | Total wallet balance |
| network | string | Settlement network |
| currency | string | Display currency |
Example
balance.ts
const balance = await client.getBalance()
console.log(`Available: $${(balance.available / 100).toFixed(2)}`)
console.log(`Reserved: $${(balance.reserved / 100).toFixed(2)}`)
console.log(`Total: $${(balance.total / 100).toFixed(2)}`)