getTokenBalances - SDK
Returns the ERC-20 token balances for a specific owner address.
Don’t have an API key?
Start using this method in your app today. Get started for free
Description
Returns the ERC-20 token balances for a specific owner address.
Parameters
Response
TokenBalancesResponseErc20
response object parameters
Example Request and Response
Prerequisite: You will need to install the Alchemy SDK before making requests with it.
The commands for installing it using npm or yarn are given below:
Request
Here is an example of how to make a getTokenBalances
request using the Alchemy SDK:
gettokenbalances.js
Response
shell
Use Cases
For guidance on how to leverage this method, check out the following tutorials:
Related Methods
Here are the methods related to getTokenBalances
:
- getBlock: Returns the block from the network based on the provided block number or hash.
- getBalance: Returns the balance of a given address as of the provided block.