Parameters
address
String
The owner of the asset.
blk
String
The block number or hash which to retrieve the balance.
assetID
String
The ID of the asset for which the balance is requested.
Returns
result
Int
The balance of an asset.
Request
1curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro \2--header 'Content-Type: application/json' \3--data-raw '{4"jsonrpc": "2.0",5"method": "eth_getAssetBalance",6"params": [7"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",8"latest",9"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"10],11"id": 112}'
1curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro \2--header 'Content-Type: application/json' \3--data-raw '{4"jsonrpc": "2.0",5"method": "eth_getAssetBalance",6"params": [7"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",8"latest",9"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"10],11"id": 112}'
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider(5"https://docs-demo.avalanche-mainnet.quiknode.pro"6);7const params = [8"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",9"latest",10"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T",11];12const result = await provider.send("eth_getAssetBalance", params);13console.log(result);14})();15
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider(5"https://docs-demo.avalanche-mainnet.quiknode.pro"6);7const params = [8"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",9"latest",10"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T",11];12const result = await provider.send("eth_getAssetBalance", params);13console.log(result);14})();15
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3params = [4"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",5"latest",6"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"7]8request = w3.provider.make_request('eth_getAssetBalance', params)9print(request)10
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3params = [4"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",5"latest",6"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"7]8request = w3.provider.make_request('eth_getAssetBalance', params)9print(request)10
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free