Wallets/balance
SOL balance
$0.01per call after 25 free a dayA wallet's SOL balance, read from the chain.
Run before sending SOL or paying fees, to confirm the wallet has enough. Never trust a remembered balance.
Keeps the model from guessing. Reads the live balance, not one remembered from earlier in a chat, so the agent never builds a transfer the wallet can't cover.
Call it
| Transport | How |
|---|---|
| HTTP | POST /api/tools/balance with a JSON body of the inputs below. |
| MCP | tools/call with name balance on /mcp. |
Inputs
| Name | What it's looking for | Where to get it |
|---|---|---|
walletstring (base58 address), required | The wallet to read the SOL balance of. | The user's address (from their wallet app) or your agent's public key. Not a .sol name or ticker. |
network"mainnet-beta" | "devnet", optional | Default "mainnet-beta" (real money). | "devnet" only for test wallets. |
Returned fields
Every field the tool returns, what it is, and exactly how it's worked out.
| Field | What it is | How it's worked out |
|---|---|---|
walletstring | The wallet that was read. | Your input, cleaned up. |
networkstring | The network that was read. | Your input. Default mainnet-beta. |
lamportsstring (integer) | The balance in lamports, SOL's smallest unit (1 SOL = 1,000,000,000 lamports). | getBalance. A string so big numbers stay exact. |
solstring (decimal) | The same balance in SOL. | lamports / 10^9 with exact integer math. |
slotnumber | The chain slot it was read at. Higher is newer. | Returned with getBalance. |