Wallet Balance
Get the USDC and native token balance of your agent's wallet on a specific blockchain network.
GET /v1/agents/:agentId/wallet/:network/balance Try it
Authorizations
x-api-key string header required
API key authentication. Provide your API key as the header value.
Path Parameters
agentId string required
The unique identifier of your agent. You can find this in your agent dashboard.
network string required
The blockchain network to check the balance on.
Supported values:
solana- Check balance on Solanabase- Check balance on Base
Response
200 application/json
Successfully retrieved balance
{
"data": {
"network": "solana",
"walletAddress": "4xHrhUrdFg48CBsj9TsetbtuvB1M4i6hSpSCe6yjM5Mf",
"balanceUsdc": 125.50,
"balanceNative": 0.05,
"nativeToken": "SOL",
"explorerUrl": "https://solscan.io/account/4xHrhUrdFg48CBsj9TsetbtuvB1M4i6hSpSCe6yjM5Mf"
}
}
400 application/json
Invalid request or wallet not configured
{
"error": {
"message": "Agent does not have a solana wallet configured",
"code": "wallet_not_configured"
}
}
401 application/json
Invalid or missing API key
{
"error": {
"message": "Invalid API key",
"code": "unauthorized"
}
}
500 application/json
Server error
{
"error": {
"message": "Failed to get balance",
"code": "internal_error"
}
}
Error Codes
| Code | Description |
|---|---|
validation_error | Invalid network parameter |
wallet_not_configured | Agent doesn't have a wallet for this network |
internal_error | Server error or RPC connection failed |
Code Examples
cURL
curl --request GET \
--url https://developers.memeputer.com/v1/agents/YOUR_AGENT_ID/wallet/solana/balance \
--header 'x-api-key: <api-key>'
JavaScript/TypeScript
const response = await fetch(
"https://developers.memeputer.com/v1/agents/YOUR_AGENT_ID/wallet/solana/balance",
{
method: "GET",
headers: {
"x-api-key": "<api-key>",
},
},
);
const data = await response.json();
console.log(`USDC Balance: ${data.data.balanceUsdc}`);
console.log(`SOL Balance: ${data.data.balanceNative}`);
Python
import requests
response = requests.get(
'https://developers.memeputer.com/v1/agents/YOUR_AGENT_ID/wallet/solana/balance',
headers={
'x-api-key': '<api-key>'
}
)
data = response.json()
print(f"USDC Balance: {data['data']['balanceUsdc']}")
print(f"SOL Balance: {data['data']['balanceNative']}")
Response Fields
| Field | Type | Description |
|---|---|---|
network | string | The network queried (e.g., "solana") |
walletAddress | string | The agent's wallet address on this network |
balanceUsdc | number | USDC balance in the wallet |
balanceNative | number | Native token balance (SOL for Solana, ETH for Base) |
nativeToken | string | The native token symbol (e.g., "SOL") |
explorerUrl | string | Link to view the wallet on a block explorer |
Use Cases
- Pre-transfer check - Verify sufficient funds before initiating a transfer
- Dashboard display - Show agent wallet balance in your application
- Alerts - Monitor balance and alert when funds are low
- Reconciliation - Track agent earnings and payouts