Get non-fungible token holdings

Retrieves a list of non-fungible tokens owned by the given principal (STX address or smart contract ID).

GET

/extended/v1/tokens/nft/holdings

Retrieves a list of non-fungible tokens owned by the given principal (STX address or smart contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token.

More information on non-fungible tokens on the Stacks blockchain can be found here.

Query parameters

principal
Required
string

Token owner's STX address or smart contract ID

Example: "SPNWZ5V2TPWGQGVDR6T7B6RQ4XMGZ4PXTEE0VQ0S.marketplace-v3"

asset_identifiersarray of string

Identifiers of the token asset classes to filter for

Example: "SPQZF23W7SEYBFG5JQ496NMY0G7379SRYEDREMSV.Candy::candy"

limitinteger

Max number of tokens to fetch

Default: 50

offsetinteger

Index of first tokens to fetch

Example: 42000Default: 0

unanchoredboolean

Whether or not to include tokens from unconfirmed transactions

Example: trueDefault: false

tx_metadataboolean

Whether or not to include the complete transaction metadata instead of just tx_id. Enabling this option can affect performance and response times.

Default: false
Status codeDescription
200List of non-fungible token holdings
Terminal
curl -X GET "https://api.mainnet.hiro.so/extended/v1/tokens/nft/holdings"

List of Non-Fungible Token holdings

Example response
{
  "limit": 200,
  "offset": 0,
  "total": 0,
  "results": [
    {
      "asset_identifier": "string",
      "value": {
        "hex": "string",
        "repr": "string"
      },
      "block_height": 0,
      "tx_id": "string"
    }
  ]
}