Balances
In this guide, we'll teach you how to look up balances on wallets and blockchain addresses.
Last updated
In this guide, we'll teach you how to look up balances on wallets and blockchain addresses.
Last updated
If you are building a solution that, at some point, needs to display wallet balances to your users - be it a recurring view or on demand - youโll need to integrate your solution with Cryptum's Get Balance functionality.
There are some implementation variations that allow you to choose an asset, a blockchain protocol or even a specific wallet to monitor the balance. It all depends solely on your business model.
You can get Tokens, NFTs, native blockchain currencies (amount) balance information using this function.
Step 1
The first prerequisite you will need is the creation of an account and a Project (API Key) on Cryptum Dashboard.
PS: Our dashboard is almost ready! To generate an API Key, contact hello@blockforce.in
Step 2
With a valid Cryptum API Key, you can then instantiate the SDK as follows:
Step 3
Now you need to define the parameters you want to check on blockchain. You need to inform the address of a wallet and the protocol. If you want to check an specific asset/token, you can set it (optional).
sdk.wallet.getWalletInfo(opts)
Get wallet address information from blockchain.
opts.address
(string)(required) - wallet address.
opts.protocol
(string)(required) - blockchain protocol.
opts.tokenAddresses
(array)(optional) - array of token addresses. Only for ETHEREUM
, CELO
, BSC
, POLYGON
, AVAXCCHAIN
and SOLANA
.