Get Asset
Get an asset by its ID.
This method is the fastest way to lookup NFTs (including metadata) on Solana.
This method will return valuable NFT metadata for compressed or standard NFTs.
post
https://rpc.helius.xyz
/?api-key=<api_key>
getAsset
Mad Lad #8613
const url = `https://mainnet.helius-rpc.com/?api-key=<api_key>`
const getAsset = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'getAsset',
params: {
id: 'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk'
},
}),
});
const { result } = await response.json();
console.log("Asset: ", result);
};
getAsset();