get asset

API details

The API retrieves detailed information for a specific asset.

Get asset information

get

In most cases, this endpoint returns a single asset regardless of whether you filter by asset ID or token contract address. However, since the system supports multiple chains, the same token contract address might exist on different chains, potentially resulting in multiple assets being returned when filtering by token contract address.

Query parameters
AssetIdstringOptional
TokenAddressstringOptional
Responses
200
OK
get
GET /v1/asset HTTP/1.1
Host: testnetopenapi.hibit.app
Accept: */*
{
  "code": 1,
  "message": "text",
  "data": [
    {
      "assetId": "text",
      "chainId": "text",
      "chainAssetType": "text",
      "contractAddress": "text",
      "decimalPlaces": "text",
      "isBaseToken": true,
      "displayName": "text",
      "assetSymbol": "text",
      "subAssets": [
        {
          "assetId": "text",
          "chainId": "text",
          "chainAssetType": "text",
          "contractAddress": "text",
          "decimalPlaces": "text"
        }
      ]
    }
  ]
}

Code example

import { hibitClient } from '@delandlabs/hibit-sdk';

const options = {
  network: HibitNetwork.Testnet
};
hibitClient.setOptions(options);

const assets = await hibitClient.getAsset(10001n);

SDK

Source code https://github.com/Deland-Labs/hibit-sdk

Last updated