Skip to main content

Import

Usage

Return Type: UseQueryResult<TokenMetadata[]>

The hook returns all properties from React Query’s UseQueryResult with token metadata. Here’s the detailed structure:

Properties

data

TokenMetadata[] | undefined Array of objects containing metadata for each requested token:
  • tokenId: ID of the specific token
  • source: Source/origin of the token metadata (e.g. “sequence”, “opensea”)
  • name: Name of the specific token (e.g., “Bored Ape #1234”)
  • description: Description of the specific token
  • image: Token image URL (automatically proxied through image service)
  • video: Video URL if token has video content
  • audio: Audio URL if token has audio content
  • properties: Additional metadata properties as key-value pairs
  • attributes: Array of trait objects for NFTs
  • image_data: Raw SVG/image data if provided
  • external_url: External URL associated with the token
  • background_color: Background color in hex format
  • animation_url: URL for animated content
  • decimals: Token decimals (for ERC1155 fungible tokens)
  • updatedAt: ISO timestamp of last metadata update
  • assets: Array of additional asset files
  • status: Current status of the metadata (“READY”, “PENDING”, “ERROR”)
  • queuedAt: ISO timestamp when metadata indexing was queued
  • lastFetched: ISO timestamp of last successful fetch

isLoading

boolean Loading state for the data fetch.

isError

boolean Error state indicating if the query failed.

error

Error | null Any error that occurred during data fetching.

Parameters

The hook accepts two parameters:

args: GetTokenMetadataArgs

options: HooksOptions