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 asset table to fetch detailed information about the assets held by the account, optionally filtering results by template IDs, collections, or schemas.

Common scenarios for this node include:

  • Displaying all NFTs owned by a user in a dashboard.
  • Filtering NFTs by specific templates or collections for analytics or reporting.
  • Integrating NFT ownership data into workflows for gaming, digital art marketplaces, or collectibles platforms.

For example, you could use this node to get all NFTs owned by an account and then trigger further processing such as sending notifications or updating a database.

Properties

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

Output

The node outputs a JSON object with the following structure:

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

Each item in the assets array represents an NFT owned by the account that matches the optional filters. The node does not output binary data.

Dependencies

  • Requires access to the WAX blockchain API endpoint (default is https://wax.greymass.com).
  • Uses the WaxJS library to interact with the blockchain.
  • No additional credentials are required beyond specifying the API endpoint.

Troubleshooting

  • Empty response from get_table_rows: This error indicates no data was returned from the blockchain API. Verify the account name is correct and that the API endpoint is reachable.
  • Response missing rows property: Indicates an unexpected response format from the API. Check if the API endpoint URL is valid and supports the expected calls.
  • Filtering issues: If no assets are returned despite owning NFTs, ensure that the optional filters (template ID, collection, schema) are correctly formatted and match existing asset properties.
  • API connectivity problems: Network issues or incorrect API endpoint URLs can cause failures. Confirm network access and endpoint correctness.

Links and References

Discussion