# Balances

### **How can I check wallet balances? What kind of balances can I check?**

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.

![](/files/LCAUI3kdrZZGQEXAJhkV)

### Integrating Wallet Info using Cryptum SDK

<mark style="color:purple;">**Step 1**</mark>

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>

<mark style="color:purple;">**Step 2**</mark>

With a valid Cryptum API Key, you can then instantiate the SDK as follows:

```javascript
const CryptumSdk = require('cryptum-sdk')

const sdk = new CryptumSdk({
  environment: 'testnet',  // 'testnet', 'mainnet'
  apiKey: "YOUR-API-KEY-HERE",
})
```

<mark style="color:purple;">**Step 3**</mark>

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)` <a href="#walletcontroller.getwalletinfo-opts" id="walletcontroller.getwalletinfo-opts"></a>

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`.

```javascript
// For Hathor protocol
const info = await sdk.wallet.getWalletInfo({
    address: 'WgzYfVxZiL7bCN37Wj8myVY9HKZ5GCACsh',
    protocol: 'HATHOR'
})
// WalletInfo {
// 	"address": "WgzYfVxZiL7bCN37Wj8myVY9HKZ5GCACsh",
// 	"link": "https://explorer.testnet.hathor.network/address/WgzYfVxZiL7bCN37Wj8myVY9HKZ5GCACsh",
// 	"balances": [
// 		{
// 			"uid": "00",
// 			"name": "Hathor",
// 			"symbol": "HTR",
// 			"amount": "39.86"
// 		}
// 	]
// }

// For Celo protocol
const info = await sdk.wallet.getWalletInfo({
    address: '0x31ec6686ee1597a41747507A931b5e12cacb920e',
    protocol: 'CELO',
    tokenAddresses: ['0xC89356398B5b66F9535417354D128b6B4fa7A38E']
})
// WalletInfo {
// 	"nonce": 281,
// 	"address": "0x31ec6686ee1597a41747507A931b5e12cacb920e",
// 	"link": "https://alfajores-blockscout.celo-testnet.org/address/0x31ec6686ee1597a41747507A931b5e12cacb920e",
// 	"balances": [
// 		{
// 			"asset": "CELO",
// 			"amount": "4.893685781169700001"
// 		},
// 		{
// 			"asset": "cUSD",
// 			"amount": "19.998999954214"
// 		},
// 		{
// 			"symbol": "dinheiro",
// 			"address": "0xC89356398B5b66F9535417354D128b6B4fa7A38E",
// 			"amount": "999",
// 			"decimals": "18"
// 		}
// 	]
// }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptum.io/english/community-edition/sdk-guides/balances.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
