Quick Start
Balances
Learn how to check your balances on Spark
Prerequisites
- A Spark wallet created following the Create First Wallet guide
- Basic understanding of Bitcoin units (satoshis)
Checking Your Balance
To check your Spark wallet balance, use the getBalance()
method:
The getBalance()
method returns a Promise resolving to an object containing:
balance
: Abigint
representing the total amount in satoshistokenBalances
: A Map of token balances, where each entry contains:balance
: Abigint
representing the token amount
Understanding Your Balance
Your balance represents the sum of all available UTXOs in your wallet. This includes:
- Deposits from Bitcoin
- Received Lightning payments
- Received Spark transfers
Claiming Incoming Funds
If you received incoming lightning payments, spark transfers, or bitcoin deposits, they won’t be reflected in your balance right away: you need to claim them.
They are automatically claimed when you initialize your wallet, but if you need to refresh your balance, use the forceRefetch
argument:
Note: That In mainnet, we recommend you maintain the balance below 1000 sats. And in regtest, we recommend you maintain the balance below 100,000 sats.
Best Practices
- Regularly check your balance to ensure expected amounts
- Verify and claim pending balances after receiving payments
Next Steps
Once you know your balance, you can:
Need Help?
- Check our FAQ
- Review the API Reference
- Check our Code Samples
- Follow our Testing Guide