avm.getAssetDescription - AVAX

Example code for the avm.getAssetDescription JSON-RPC method. Complete guide on how to use avm.getAssetDescription JSON-RPC in GetBlock Web3 documentation.

Returns metadata for an asset on the X-Chain — name, symbol, denomination (decimals), and asset ID.

Parameters

Parameter
Type
Required
Description

assetID

string

Yes

Asset ID (CB58)

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/X' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "avm.getAssetDescription",
    "params": {
        "assetID": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z"
    },
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "assetID": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z",
        "name": "Avalanche",
        "symbol": "AVAX",
        "denomination": "9"
    }
}

Response Parameters

Field
Type
Description

result.assetID

string

Asset ID echoed back

result.name

string

Asset name

result.symbol

string

Asset symbol (ticker)

result.denomination

string

Number of decimals (AVAX = 9)

Use Cases

  • Showing asset names/symbols in wallet UIs

  • Formatting balances with the correct decimal precision

  • Asset directories and explorers

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?