Skip to main content
What you’ll build:
  • Fetch a wallet’s total NFT value broken down by chain
  • List NFT collections sorted by floor value
  • Drill into individual NFT positions with metadata
  • Filter by specific collections
Time: ~10 minutes

Prerequisites

Steps

1

Get the NFT portfolio overview

Start by fetching the wallet’s NFT portfolio to get total NFT value broken down by chain.
The response includes positions_distribution_by_chain, a map of chain IDs to their total NFT floor value (e.g., ethereum: 1820.50, polygon: 37.56).
The API may return a 202 status if the wallet’s NFT data is still being indexed. Poll the endpoint until you receive a 200 response.
2

Fetch NFT collections

Get the wallet’s NFT collections grouped by collection, sorted by total floor price.
Each collection entry includes:
  • collection_info.name - the collection name
  • nfts_count - how many NFTs from this collection the wallet holds
  • total_floor_price - combined floor value of the wallet’s positions in this collection
  • min_changed_at / max_changed_at - acquisition timestamps
3

Fetch individual NFT positions

Drill into the specific NFT positions held by the wallet, sorted by floor price.
Using sort=-floor_price orders NFTs by their floor price (highest first). Each position includes:
  • nft_info.name - the NFT’s name or token ID
  • collection_info.name - the collection it belongs to
  • value - estimated USD value based on the collection’s floor price
4

Filter by collection (optional)

To show NFTs from a specific collection, use the filter[collection_ids] parameter. Collection IDs are UUIDs found in the relationships.collection.data.id field of each NFT position returned by the endpoints above.
5

Full working example

Save as nft-portfolio.mjs and run with node nft-portfolio.mjs:

Next steps

  • Use pagination to handle wallets with large NFT collections
  • Include the nft_collections relationship in the include parameter to get full collection metadata in one request
  • Combine with the transactions endpoint to track NFT purchase and sale history