Retrieve solana balance
Retrieve the solana balance of a wallet.
Path Parameters
id
(string)
The id of the wallet being retrieved.
Response
result
(object)
An object containing the solana balance of the wallet.
wallet
(string)
The id of the wallet being retrieved.
lamports
(number)
The number of lamports in the wallet.
sol
(number)
The number of sol in the wallet.
solscan
(object)
An object containing Solana Explorer URLs for the wallet.
wallet
(string)
The Solana Explorer URL for the wallet.
Useful for
Verifying the current balance of a wallet.
Determining if the wallet has sufficient funds for a transaction.
Assessing the wallet's balance prior to initiating a transaction.
Reviewing the wallet's balance following a transaction.
Building trading bot that trades conditionally based on the wallet's balance.
Endpoint
https://api.tradepump.fun/v1/solana/balance/:id
Example Request
1
2
3
4
5
6
7
import { PumpApiClient } from 'tradepumpfun';
const client = new PumpApiClient({
apiKey: '<your-api-key>'
});
await client.solana.balance({ wallet: "<wallet>" });
Response Example
{
"result": {
"wallet": "<:id>",
"lamports": 1000000000,
"sol": 1,
},
"solscan": {
"wallet": "https://solscan.io/account/<:id>"
}
}