Comment on page
avm.getBalance
Get the balance of an asset controlled by a given address.
avm.getBalance({
address: string,
assetID: string
}) -> {balance: int}
address
owner of the assetassetID
id of the asset for which the balance is requested
Request
curl -X POST --data '{
"jsonrpc":"2.0",
"id" : 1,
"method" :"avm.getBalance",
"params" :{
"address":"X-avax1ns3jzhqyk7parg29qan56k0fcxwstc76cjqq2s",
"assetID": "2pYGetDWyKdHxpFxh2LHeoLNCH6H5vxxCxHQtFnnFaYxLsqtHC"
}
}' -H 'content-type:application/json;' https://ava-mainnet.blastapi.io/<project-id>/ext/bc/X
Result
{
"jsonrpc":"2.0",
"id" :1,
"result" :{
"balance":"299999999999900",
"utxoIDs":[
{
"txID":"WPQdyLNqHfiEKp4zcCpayRHYDVYuh1hqs9c1RqgZXS4VPgdvo",
"outputIndex":1
}
]
}
}
Last modified 1yr ago