FireblocksSdk.Api.Nft (FireblocksSdk v0.2.1)

Copy Markdown View Source

Fireblocks NFTs API.

Covers all endpoints under the NFTs tag (/v1/nfts), split across two resource families:

  • Token data (/v1/nfts/tokens) — retrieve and refresh NFT metadata.
  • Ownership (/v1/nfts/ownership) — list, filter, and update the status or spam classification of NFTs held across vault accounts or Non-Custodial Wallets (NCW).

All paginated GET endpoints use cursor-based pagination via pageCursor and return a paging.next cursor for the following page.

Summary

Functions

Returns the token data for a single NFT by its Fireblocks NFT asset ID.

Returns token data for a batch of NFTs identified by their Fireblocks asset IDs.

Returns all tokens and their ownership data held in your workspace, with optional filtering and cursor-based pagination.

Returns all NFT collections held across the workspace, with optional filtering and cursor-based pagination.

Returns all distinct tokens owned by the tenant (deduplicated across vault accounts), with optional filtering and cursor-based pagination.

Triggers a refresh of the metadata for a single NFT.

Refreshes all token balances for a given vault account on the specified blockchain.

Updates the ownership status of a single NFT across all tenant vaults.

Updates the spam classification of multiple NFTs in a single request.

Updates the ownership status of multiple NFTs in a single request.

Functions

get_nft(id)

@spec get_nft(String.t()) :: map()

Returns the token data for a single NFT by its Fireblocks NFT asset ID.

  • id: Fireblocks NFT asset ID, e.g. "NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd".

get_nfts(params)

@spec get_nfts(keyword()) :: map()

Returns token data for a batch of NFTs identified by their Fireblocks asset IDs.

The required ids option is a comma-separated string of up to 100 NFT asset IDs.

Options:

  • :ids (String.t/0) - Required. Comma-separated list of Fireblocks NFT asset IDs to retrieve (max 100)

  • :sort (String.t/0) - Comma-separated sort field(s). Allowed values: collection.name, name, blockchainDescriptor

  • :order - Sort direction — "ASC" (default) or "DESC"

  • :pageCursor (String.t/0) - Page cursor returned from a previous response's paging.next field

  • :pageSize (non_neg_integer/0) - Number of items per page (min: 1, max: 100)

get_ownership_tokens(opts \\ [])

@spec get_ownership_tokens(keyword()) :: map()

Returns all tokens and their ownership data held in your workspace, with optional filtering and cursor-based pagination.

Options:

  • :blockchainDescriptor (String.t/0) - Filter by blockchain. Supported values: ETH, ETH_TEST3, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, XTZ, XTZ_TEST, BASECHAIN_ETH, BASECHAIN_ETH_TEST3, BASECHAIN_ETH_TEST5, ETHERLINK, ETHERLINK_TEST, MANTLE, MANTLE_TEST, GUN_GUNZILLA, GUN_GUNZILLA_TEST, ETH_SONEIUM, SONEIUM_MINATO_TEST, IOTX_IOTEX, KLAY_KAIA, KLAY_KAIA_TEST, APECHAIN, APECHAIN_TEST, CRONOS, CRONOS_TEST, ROBINHOOD_CHAIN_TESTNET_TEST

  • :vaultAccountIds (String.t/0) - Comma-separated vault account IDs to filter by (max 100). Ignored when walletType is END_USER_WALLET or ncwId is provided.

  • :ncwId (String.t/0) - Tenant's Non-Custodial Wallet ID

  • :ncwAccountIds (String.t/0) - Comma-separated NCW account IDs (max 100). Ignored when walletType is VAULT_ACCOUNT or ncwId is not provided.

  • :walletType - Wallet type — "VAULT_ACCOUNT" (default) or "END_USER_WALLET"

  • :ids (String.t/0) - Comma-separated Fireblocks NFT asset IDs to filter by (max 100)

  • :collectionIds (String.t/0) - Comma-separated collection IDs to filter by (max 100)

  • :sort (String.t/0) - Comma-separated sort field(s). Allowed values: ownershipLastUpdateTime, name, collection.name, blockchainDescriptor

  • :order - Sort direction — "ASC" (default) or "DESC"

  • :status - Filter by ownership status — "LISTED" (default) or "ARCHIVED"

  • :search (String.t/0) - Search by token name/ID, collection name, or blockchain (max 100 chars)

  • :spam (String.t/0) - Filter by spam status — "true", "false", or "all"

  • :pageCursor (String.t/0) - Page cursor returned from a previous response's paging.next field

  • :pageSize (non_neg_integer/0) - Number of items per page (min: 1, max: 100)

list_owned_collections(opts \\ [])

@spec list_owned_collections(keyword()) :: map()

Returns all NFT collections held across the workspace, with optional filtering and cursor-based pagination.

Options:

  • :ncwId (String.t/0) - Tenant's Non-Custodial Wallet ID

  • :walletType - Wallet type — "VAULT_ACCOUNT" (default) or "END_USER_WALLET"

  • :search (String.t/0) - Search by collection name or contract address (max 100 chars)

  • :sort (String.t/0) - Sort by field. Allowed values: name

  • :order - Sort direction — "ASC" (default) or "DESC"

  • :status - Filter by ownership status — "LISTED" (default) or "ARCHIVED"

  • :pageCursor (String.t/0) - Page cursor returned from a previous response's paging.next field

  • :pageSize (non_neg_integer/0) - Number of items per page (min: 1, max: 100)

list_owned_tokens(opts \\ [])

@spec list_owned_tokens(keyword()) :: map()

Returns all distinct tokens owned by the tenant (deduplicated across vault accounts), with optional filtering and cursor-based pagination.

Options:

  • :ncwId (String.t/0) - Tenant's Non-Custodial Wallet ID

  • :walletType - Wallet type — "VAULT_ACCOUNT" (default) or "END_USER_WALLET"

  • :sort (String.t/0) - Sort by field. Allowed values: name

  • :order - Sort direction — "ASC" (default) or "DESC"

  • :status - Filter by ownership status — "LISTED" (default) or "ARCHIVED"

  • :search (String.t/0) - Search owned tokens by token name (max 100 chars)

  • :spam (String.t/0) - Filter by spam status — "true", "false", or "all"

  • :pageCursor (String.t/0) - Page cursor returned from a previous response's paging.next field

  • :pageSize (non_neg_integer/0) - Number of items per page (min: 1, max: 100)

refresh_nft_metadata(id, idempotency_key \\ "")

@spec refresh_nft_metadata(String.t(), String.t()) :: any()

Triggers a refresh of the metadata for a single NFT.

Fireblocks will re-fetch the token's metadataURI and update cached values. Returns 202 Accepted — the refresh happens asynchronously.

  • id: Fireblocks NFT asset ID.
  • idempotency_key: Optional X-Idempotency-Key header value.

update_ownership_tokens(params, idempotency_key \\ "")

@spec update_ownership_tokens(
  keyword(),
  String.t()
) :: any()

Refreshes all token balances for a given vault account on the specified blockchain.

Triggers an asynchronous update; returns 202 Accepted.

  • idempotency_key: Optional X-Idempotency-Key header value.

Options:

  • :blockchainDescriptor (String.t/0) - Required. Blockchain to refresh. Supported values: ETH, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, BASECHAIN_ETH, BASECHAIN_ETH_TEST5, ETHERLINK, ETHERLINK_TEST, MANTLE, MANTLE_TEST, GUN_GUNZILLA, GUN_GUNZILLA_TEST, ETH_SONEIUM, SONEIUM_MINATO_TEST, IOTX_IOTEX, KLAY_KAIA, KLAY_KAIA_TEST, APECHAIN, APECHAIN_TEST, ROBINHOOD_CHAIN_TESTNET_TEST

  • :vaultAccountId (String.t/0) - Required. Vault account ID whose token balances should be refreshed

update_token_ownership_status(id, params, idempotency_key \\ "")

@spec update_token_ownership_status(String.t(), keyword(), String.t()) :: any()

Updates the ownership status of a single NFT across all tenant vaults.

  • id: Fireblocks NFT asset ID.
  • idempotency_key: Optional X-Idempotency-Key header value.

Options:

  • :status - Required. New ownership status — "LISTED" or "ARCHIVED"

update_tokens_ownership_spam(items, idempotency_key \\ "")

@spec update_tokens_ownership_spam([map()], String.t()) :: any()

Updates the spam classification of multiple NFTs in a single request.

Accepts a list of maps, each with:

  • "assetId" — Fireblocks NFT asset ID (required)

  • "spam"true to mark as spam, false to unmark (required)

  • idempotency_key: Optional X-Idempotency-Key header value.

Example

FireblocksSdk.Api.Nft.update_tokens_ownership_spam([
  %{"assetId" => "NFT-abc...", "spam" => true},
  %{"assetId" => "NFT-def...", "spam" => false}
])

update_tokens_ownership_status(items, idempotency_key \\ "")

@spec update_tokens_ownership_status([map()], String.t()) :: any()

Updates the ownership status of multiple NFTs in a single request.

Accepts a list of maps, each with:

  • "assetId" — Fireblocks NFT asset ID (required)

  • "status""LISTED" or "ARCHIVED" (required)

  • idempotency_key: Optional X-Idempotency-Key header value.

Example

FireblocksSdk.Api.Nft.update_tokens_ownership_status([
  %{"assetId" => "NFT-abc...", "status" => "ARCHIVED"},
  %{"assetId" => "NFT-def...", "status" => "LISTED"}
])