Checking Solana Wallet Balance Using NOWNodes RPC


For developers building on Solana, retrieving a wallet balance is a common and essential task. In this post, we'll walk through how to check a Solana wallet's balance using the getBalance
RPC method through the NOWNodes managed RPC service.
Why Use NOWNodes RPC?
Running and maintaining your own Solana full node can be complex and resource-intensive. NOWNodes provides ready-to-use RPC endpoints with high availability and scalability, allowing developers to focus on application logic rather than node infrastructure.
Key features:
Full access to Solana RPC endpoints over HTTP and WebSocket
Zero setup required
Scalable for production workloads
RPC Method: getBalance
The getBalance
method queries the current balance of a Solana account in lamports.
1 SOL = 1,000,000,000 lamports
The method returns an integer value representing lamports
Example Request
Using curl
, here's how to make a getBalance
request to NOWNodes:
curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
"jsonrpc": "2.0", "id": 1,
"method": "getBalance",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
]
}
'
Replace:
YOUR_API_KEY
with your NOWNodes API keyThe address inside
params
with the Solana wallet public key to check
Example Response
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 1
},
"value": 0
},
"id": 1
}
The value
field indicates the balance in lamports. To convert to SOL, divide the result by 1_000_000_000
.
Use Case
This RPC call is suitable for:
Wallet applications
Blockchain explorers
Backend services that track account balances
Automated monitoring scripts
Since NOWNodes is a fully managed provider, it's a practical option for production environments where performance and uptime are critical.
Conclusion
To retrieve the balance of a Solana wallet:
Obtain a public wallet address
Acquire an API key from NOWNodes
Use the
getBalance
RPC call with your credentials
This approach gives you quick, programmatic access to Solana account balances with no infrastructure overhead.
Let me know if you’d like examples in other languages (e.g., Python, JavaScript) or want to explore more advanced RPC methods.
Subscribe to my newsletter
Read articles from NOWNodes directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
