Read a balance in one request
Put the address in the path. Nothing else is required. No header, no query string and no body.
curl https://aisenseapi.com/services/v1/solana/balance/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM{"wallet":"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM","balance_sol":9750012.870836154,"balance_lamports":9750012870836154}That example uses a large, long-lived public address, which makes both units easy to see side by side. Balances move, of course. Read the figure above as a snapshot from the day this page was written, not as a constant to assert in a test.
What the free Solana balance API endpoint returns
Three fields come back on every successful lookup.
| Field | Type | Description |
|---|---|---|
| wallet | string | The address you asked about, echoed back so a response can be matched to its request when several are in flight. |
| balance_sol | number | The balance expressed in SOL, as a decimal number. |
| balance_lamports | number | The same balance in lamports, the integer base unit that the chain itself counts in. |
The echoed wallet field earns its place as soon as you fan out. Fire twenty lookups concurrently and the replies arrive in whatever order the network decides, so pairing each answer with its question by position is a bug waiting to happen. Match on the echo instead.
Lamports and SOL
1 SOL is 1000000000 lamports, nine zeroes. Solana stores balances only in lamports. SOL is a presentation unit that exists for people, not for the ledger.
Both numbers are returned on every call. That saves you from dividing by a billion, and it removes the more dangerous problem: guessing which of the two units you were handed. Unit bugs almost always start with that guess.
Watch the types, because they differ. balance_sol is a float. balance_lamports is an integer. Lamports is therefore the field to do arithmetic on, and SOL is the field to print.
Do the arithmetic on lamports
Floats round. Sum a column of balance_sol values and the total drifts. Compare two of them for equality and the answer is a coin toss on the last bits. Never let a float decide whether an account covers a transfer.
Integers have their own trap here, and the example response walks straight into it. 9750012870836154 lamports is larger than 9007199254740992, the biggest integer a JavaScript number holds without loss. Hand that response to JSON.parse in a browser or in Node and the final digits get quietly rewritten. No error is raised. No warning appears.
Two fixes work. Parse the raw response text with a JSON parser that supports big integers, or pull the lamports value out as a string and lift it into a BigInt before any arithmetic. The same caution applies in every language whose default JSON number is a 64 bit float, which is most of them.
Addresses go in the path
A Solana address is a 32 byte ed25519 public key written in base58, 44 characters long in the usual case. There is no checksum wrapped around it, unlike the Bitcoin address formats. Mistype one character and you usually get another string that still decodes to 32 perfectly valid bytes.
So a format check is only a format check. Confirming that a string is valid base58 of the right length does not prove it is the address a human meant. Copy and paste addresses. Do not read them out loud and retype them.
Need to encode bytes into base58 yourself while building fixtures? The Base58 Encode API endpoint does that half of the job. To mint throwaway addresses to look up, use the Solana Wallet API endpoint, which returns a fresh key pair in both formats the ecosystem expects.
Common uses
Balance dashboards
Poll a set of public addresses for a monitoring panel, and total the integer lamports field rather than the float.
Treasury alerts
Compare today's lamports against yesterday's and raise a flag when the difference crosses a threshold you set.
Devnet test runs
Generate an address, fund it, then assert on the balance the free Solana balance API endpoint reports back.
Agent tools
Give a language model a one line lookup that needs no credentials and returns both units already computed.
Teaching material
Show a class the same balance in two units in one response, which makes the lamport relationship obvious.
Privacy and limits
This lookup is read-only. It reveals nothing that is not already public on the chain, and it never asks for a private key.
The address travels in the URL path, so it lands in request logs along the way. For a public address that is not a secret. It does link an IP address to an interest in that account, which is worth knowing if you poll something you care about.
The service-wide limit is 5000 requests per IP per 24 hours, with no API key and no account. Balances only change when a slot confirms, so cache a result for a few seconds instead of polling in a tight loop and the free Solana balance API endpoint will never come near that ceiling.
Every service in the catalogue shares that same allowance. Browse them all on the free public REST APIs hub.