GET
/
v1
/
networks
/
{network}
/
blockchains
/
{blockchainId}
/
assets
/
{assetId}
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  serverURL: "https://api.example.com",
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.primaryNetwork.getAssetDetails({
    blockchainId: "x-chain",
    network: "mainnet",
    assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
  "name": "Avalanche",
  "symbol": "AVAX",
  "denomination": 9,
  "type": "secp256k1",
  "createdAtTimestamp": 1675444720,
  "cap": "fixed"
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

blockchainId
enum<string>
required

A primary network blockchain id or alias.

Available options:
2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM,
2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm,
2piQ2AVHCjnduiWXsSY15DtbVuwHE2cwMHYnEXHsLL73BBkdbV,
x-chain
network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet,
devnet
assetId
string
required

Asset ID for any asset on X-Chain

Response

200
application/json
Successful response
assetId
string
required

Unique ID for an asset.

Example:

"th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof"

name
string
required

Name of this asset.

Example:

"Avalanche"

symbol
string
required

Symbol for this asset (max 4 characters).

Example:

"AVAX"

denomination
number
required

Denomination of this asset to represent fungibility.

Example:

9

type
enum<string>
required

Type of asset like SECP256K1 or NFT.

Available options:
secp256k1,
nft
createdAtTimestamp
number
required

Timestamp in seconds this asset was created on.

Example:

1675444720

cap
enum<string>
required

Cap represents if an asset is a variable or fixed cap asset.

Available options:
fixed,
variable