curl -X GET "https://api.danubeai.com/v1/wallet/balance" \
-H "danube-api-key: YOUR_API_KEY"
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
balance = client.wallet.get_balance()
print(f"Balance: ${balance.balance_cents / 100:.2f}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const balance = await client.wallet.getBalance();
console.log(`Balance: $${(balance.balanceCents / 100).toFixed(2)}`);
{
"balance_cents": 1500,
"lifetime_spent_cents": 350,
"lifetime_deposited_cents": 2000
}
Wallet
Get Wallet Balance
Get your wallet balance
GET
/
v1
/
wallet
/
balance
curl -X GET "https://api.danubeai.com/v1/wallet/balance" \
-H "danube-api-key: YOUR_API_KEY"
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
balance = client.wallet.get_balance()
print(f"Balance: ${balance.balance_cents / 100:.2f}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const balance = await client.wallet.getBalance();
console.log(`Balance: $${(balance.balanceCents / 100).toFixed(2)}`);
{
"balance_cents": 1500,
"lifetime_spent_cents": 350,
"lifetime_deposited_cents": 2000
}
Overview
Returns your current wallet balance, including lifetime spending and deposit totals. Use this to check if you have sufficient funds before executing paid tools. Auth: Requires authentication (JWT or API key).Response
integer
Current balance in cents (e.g. 1500 = $15.00)
number
The same balance in dollars
integer
Total amount spent in cents
integer
Total amount deposited in cents
Example
curl -X GET "https://api.danubeai.com/v1/wallet/balance" \
-H "danube-api-key: YOUR_API_KEY"
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
balance = client.wallet.get_balance()
print(f"Balance: ${balance.balance_cents / 100:.2f}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const balance = await client.wallet.getBalance();
console.log(`Balance: $${(balance.balanceCents / 100).toFixed(2)}`);
{
"balance_cents": 1500,
"lifetime_spent_cents": 350,
"lifetime_deposited_cents": 2000
}
MCP Tool
This endpoint is also available as theget_wallet_balance MCP tool:
result = await mcp.call_tool("get_wallet_balance", {})
