Get Asset Batch

Get multiple assets by their IDs.

Overview

This method will return valuable NFT metadata for multiple compressed or standard NFTs. You can pass up to 1,000 IDs in this request.

Code Example

const url = `https://mainnet.helius-rpc.com/?api-key=<api_key>`

const getAssetBatch = async () => {
  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 'my-id',
      method: 'getAssetBatch',
      params: {
        ids: [
          '81bxPqYCE8j34nQm7Rooqi8Vt3iMHLzgZJ71rUVbQQuz',
          'CWHuz6GPjWYdwt7rTfRHKaorMwZP58Spyd7aqGK7xFbn'
        ]
      },
    }),
  });
  const { result } = await response.json();
  console.log("Assets: ", result);
};
getAssetBatch();

Last updated