Asset Information
GET /v2/assets/{assetId}
Get asset information.
Given a asset ID, it returns asset information including creator, name, total supply and special addresses.
Properties
| Name | Type | Description |
|---|---|---|
| assetId* | string | An asset identifier |
* indicates required property
Packages
Node.js
Install
npm install algosdk --saveUsage
import { Algodv2 } from "algosdk";
const data = {assetId: 84633127}const client = new Algodv2( "", "https://testnet-api.algonode.cloud", 443 );const result = await client.getAssetByID(data.assetId).do(); Algosdk Documentation Learn more at the official documentation for algosdk
Coming Soon!
Algokit Documentation Learn more at the official documentation for algokit
import { AlgodClient } from '@awesome-algorand/algod-fetch';
const data = {assetId: 84633127}const client = new AlgodClient();const result = await client.public.getAssetById(data); Algo-fetch Documentation Learn more at the experimental documentation for algo-fetch
React
Install
npm install @awesome-algorand/react-query @txnlab/use-wallet-react @tanstack/react-query algosdk --saveUsage
import { useAssetInformation } from '@awesome-algorand/react-query';
export function AssetInformationViewer() { const data = {assetId: 84633127} const query = useAssetInformation(data);} Tutorial Learn how to use the useAssetInformation hook in a React application.
Install
npm install @awesome-algorand/query-core @txnlab/use-wallet-react @tanstack/react-query algosdk --saveUsage
import { useQuery } from 'react-query';import { getAssetById } from '@awesome-algorand/query-core';import { useWallet } from "@txnlab/use-wallet-react";
export function AssetInformationViewer() { const walletManager = useWallet(); const data = {assetId: 84633127} const query = useQuery(getAssetById(data));} Svelte [WIP]
Coming Soon!
Solid [WIP]
Coming Soon!
Vue [WIP]
Coming Soon!
Angular [WIP]
Coming Soon!