WAX Get Assets icon

WAX Get Assets

Get NFTs for an account

Overview

This node retrieves NFTs (non-fungible tokens) owned by a specified WAX blockchain account. It queries the blockchain's table of assets for the given account and filters the results based on optional criteria such as template IDs, collections, and schemas. This is useful for workflows that need to analyze, display, or process NFT holdings of WAX accounts.

Common scenarios include:

  • Displaying a user's NFT inventory in a dashboard.
  • Filtering NFTs by specific templates or collections for further processing.
  • Integrating NFT ownership data into other applications or automations.

Example: Fetch all NFTs owned by the account "exampleuser" from the "atomicassets" contract on the WAX blockchain endpoint, optionally filtering to only certain template IDs or collections.

Properties

Name Meaning
Account Name The WAX blockchain account name whose NFTs you want to retrieve.
Template ID (Optional) Comma-separated list of numeric template IDs to filter the NFTs. Only NFTs matching these templates will be returned.
Collection (Optional) Comma-separated list of collection names to filter the NFTs. Only NFTs in these collections will be returned.
Schema (Optional) Comma-separated list of schema names to filter the NFTs. Only NFTs matching these schemas will be returned.
Code The smart contract account name on WAX that manages the NFTs, default is "atomicassets".
API Endpoint The URL of the WAX blockchain API endpoint to query, default is "https://wax.greymass.com".

Output

The node outputs an array with one item per input. Each output item contains a JSON object with the following structure:

{
  "account": "string",        // The queried WAX account name
  "assets": [                 // Array of NFT asset objects matching the filters
    {
      "asset_id": "string",   // Unique identifier of the NFT asset
      "template_id": number,  // Template ID of the NFT
      "collection_name": "string", // Collection name the NFT belongs to
      "schema_name": "string"      // Schema name of the NFT
    }
  ]
}

No binary data is output by this node.

Dependencies

  • Requires access to a WAX blockchain API endpoint supporting EOSIO RPC calls (default: https://wax.greymass.com).
  • Uses the eosjs library to interact with the blockchain.
  • No special credentials are required, but the endpoint must be accessible.

Troubleshooting

  • Empty response from get_table_rows: Indicates no data was returned from the blockchain API. Verify the account name and endpoint URL are correct.
  • Response missing rows property: The API response did not contain expected data. This could indicate an issue with the endpoint or network problems.
  • Result rows is not an array warning: Unexpected data format received; check if the blockchain API is functioning properly.
  • If filtering by template ID, collection, or schema returns no assets, ensure the filter values exactly match those on-chain (case-sensitive and correct IDs).
  • Network connectivity issues to the API endpoint can cause failures; verify endpoint accessibility.

Links and References

Discussion