Skip to main content

qn_getWalletTokenBalance RPC Method

Returns ERC-20 tokens and token balances within a wallet. The API credit value for this method is 4.

Updated on
Jun 9, 2023

qn_getWalletTokenBalance RPC Method

Please note that this RPC method supports ERC-20 compliant contracts (on Ethereum mainnet). We are in the process of deprecating V1 and strongly encourage all developers to migrate to our NFT and Token API v2 bundle for improved functionalities and broader chain compatibility.

Parameters

object
array
The custom object with the following fields:
wallet
string
The wallet address to check for ERC-20 tokens.
contracts
string
An array with the list of ERC-20 contract addresses to filter wallet balance results on. You may include up to 100 contract addresses per request

Returns

object
The custom response object, or null if no tokens are found:
assets
An array of objects representing tokens with the following shape:
address
The address of the ERC-20 token contract
name
The name of the token
decimals
The number of decimal places supported by the token contract
symbol
The symbol of the token
logoURl
The URL address of the token
chain
The chain where the contract was deployed
network
The network where the contract was deployed
amount
The balance of the token within the owner's wallet
owner
The wallet address we checked for tokens
totalPages
The total number of results pages available
pageNumber
The page number of results that was returned with this response
totalItems
The total number of results
Request
1
curl https://docs-demo.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-H "x-qn-api-version: 1" \
5
--data '{
6
"id":67,
7
"jsonrpc":"2.0",
8
"method":"qn_getWalletTokenBalance",
9
"params":{
10
"wallet": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
11
}
12
}'
13
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free