SDK Explorer

Fetches the token balance for a user-controlled wallet.

Parameters
input
object
Required

Represents the input parameters for retrieving the token balance of a wallet.

option 1:
userId
string
Required

Unique system-generated identifier for the user.

includeAll
boolean

Specifies whether to include all tokens.

name
string

The name of the token to filter for.

standard
string

Token standard.

Allowed valuesERC1155ERC20ERC721FungibleFungibleAssetNonFungibleNonFungibleEditionProgrammableNonFungibleProgrammableNonFungibleEdition
tokenAddresses
array of strings

An array of token addresses.

walletId
string
Required

The ID of the wallet to retrieve the tokens for.

pageAfter
string

Used to return items after the specified item exclusively. SHOULD NOT be used in conjunction with pageBefore.

pageBefore
string

Used to return items before the specified item exclusively. SHOULD NOT be used in conjunction with pageAfter.

pageSize
number

The number of items to return.

option 2:
userToken
string
Required

The JSON Web Token (JWT) representing the user.

includeAll
boolean

Specifies whether to include all tokens.

name
string

The name of the token to filter for.

standard
string

Token standard.

Allowed valuesERC1155ERC20ERC721FungibleFungibleAssetNonFungibleNonFungibleEditionProgrammableNonFungibleProgrammableNonFungibleEdition
tokenAddresses
array of strings

An array of token addresses.

walletId
string
Required

The ID of the wallet to retrieve the tokens for.

pageAfter
string

Used to return items after the specified item exclusively. SHOULD NOT be used in conjunction with pageBefore.

pageBefore
string

Used to return items before the specified item exclusively. SHOULD NOT be used in conjunction with pageAfter.

pageSize
number

The number of items to return.

Responses
Example
1const response = await client.getWalletTokenBalance({
2  walletId: 'wallet-id',
3  userToken: 'dummy-user-token',
4})
5console.log(response.data?.tokenBalances)
ResponseChoose an example
1{
2  "data": {
3    "tokenBalances": [
4      {
5        "amount": "6.62607015",
6        "token": {
7          "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
8          "name": "",
9          "standard": "ERC20",
10          "blockchain": "MATIC-AMOY",
11          "decimals": 0,
12          "isNative": false,
13          "symbol": "",
14          "tokenAddress": "0xca9142d0b9804ef5e239d3bc1c7aa0d1c74e7350",
15          "updateDate": "2023-01-01T12:04:05Z",
16          "createDate": "2023-01-01T12:04:05Z"
17        },
18        "updateDate": "2023-01-01T12:04:05Z"
19      }
20    ]
21  }
22}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.