TriportRPC

Get NFT holdings (ERC721 + ERC1155)

GEThttps://api.triport.io/v1/polygon/wallet/nfts/0x5e8f0bcd1b2c3d4e5f60718293a4b5c6d7e8f901?limit=50&offset=0

Returns the ERC721 and ERC1155 NFTs held by a Polygon address, with per-asset metadata, paged with `limit`/`offset`.

Polygonpro and above; RPS is enforced per tier + category (polygon_wallet) with a 2× burst allowance

Lists the non-fungible tokens (NFTs) owned by a single Polygon address. Both token standards are returned in one array: ERC721 (unique, single-owner tokens) and ERC1155 (semi-fungible tokens that can be held in quantity). For ERC1155 assets the held quantity is reported in the amount field; for ERC721 assets amount is omitted or "1".

Each entry carries available metadata — name, image_uri, and collection_name — alongside the on-chain identity (contract + token_id). Metadata fields are best-effort: an NFT whose metadata is unindexed or unreachable will still appear with its contract, token_id, and standard, but may omit the descriptive fields.

Results are paged with limit and offset. Use this endpoint to render a wallet's NFT gallery or to reconcile holdings for a known address. The address is treated read-only; no signing or authentication of the wallet is required — only your Triport API key.

Parameters

Path parameters

addressstringrequired
Polygon address, 0x-prefixed, 40 hex chars (Ethereum-compatible format). Pattern: ^0x[0-9a-fA-F]{40}$.
Query parametersobject
limitintegeroptional
Page size. Min 1, max 1000, default 50.
offsetintegeroptional
Number of assets to skip. Min 0, default 0.

Response

Response fields

FieldTypeDescription
addressstringThe address that was queried (echoed back).
assetsarrayList of PolyNftSummary objects (see below).
paginationobjectPaging envelope: limit, offset, and optionally total.

assets[]PolyNftSummary

FieldTypeRequiredDescription
contractstringyesNFT contract address (0x-prefixed).
token_idstringyesToken identifier. String-encoded to safely carry values beyond 2⁵³.
standardstringyesToken standard: ERC721 or ERC1155.
amountstringnoQuantity held. Meaningful for ERC1155; for ERC721 this is "1" or omitted.
namestringnoDisplay name of the NFT, when indexed.
image_uristring (uri)noMedia URI for the NFT, when available.
collection_namestringnoName of the collection the NFT belongs to, when known.

pagination

FieldTypeRequiredDescription
limitintegeryesPage size used (1–1000, default 50).
offsetintegeryesOffset applied (≥ 0, default 0).
totalintegernoTotal assets available. Absent when too expensive to compute.

Errors

All errors use the shared envelope (error, message, request_id). See errors.md for the full envelope and error-code reference.

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing or invalid API key, or the account's trial/subscription has lapsed.
403tier_insufficient / method_unknownThe account's tier is below pro. The body includes current_tier, required_tier, and upgrade_url; the X-Required-Tier header is also set.
429rate_limitedSustained RPS for the polygon_wallet category exceeded. Honor the Retry-After and X-RateLimit-* headers before retrying.

Examples

JavaScript (fetch)

const address = "0x5e8f0bcd1b2c3d4e5f60718293a4b5c6d7e8f901";
const url = `https://api.triport.io/v1/polygon/wallet/nfts/${address}?limit=50&offset=0`;


const res = await fetch(url, {
  headers: {
    Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
});


if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).message}`);
const { assets, pagination } = await res.json();
console.log(`${assets.length} NFTs (offset ${pagination.offset})`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const { assets, pagination } = await triport.polygon.wallet.nfts({
  address: "0x5e8f0bcd1b2c3d4e5f60718293a4b5c6d7e8f901",
  limit: 50,
  offset: 0,
});


for (const nft of assets) {
  console.log(`${nft.standard} ${nft.collection_name ?? "?"} #${nft.token_id}`);
}

Python (triport-sdk)

import os
from triport import Triport


client = Triport(api_key=os.environ["TRIPORT_API_KEY"])


page = client.polygon.wallet.nfts(
    address="0x5e8f0bcd1b2c3d4e5f60718293a4b5c6d7e8f901",
    limit=50,
    offset=0,
)


for nft in page.assets:
    qty = f" x{nft.amount}" if nft.standard == "ERC1155" else ""
    print(f"{nft.standard} {nft.contract} #{nft.token_id}{qty}")

Notes

  • Pagination: request successive pages by advancing offset in steps of limit until fewer than limit assets are returned. When present, compare offset + len(assets) against pagination.total; total may be absent when it is expensive to compute, so do not rely on it being set.
  • ERC721 vs ERC1155: branch on the standard field. Read amount only for ERC1155 assets; for ERC721 the quantity is implicitly one.
  • Token IDs are strings. token_id and amount are string-encoded to preserve precision beyond JavaScript's safe-integer range — parse as BigInt where you need arithmetic.
  • Best-effort metadata. name, image_uri, and collection_name may be absent when an asset is unindexed; always handle the missing case in your UI.
  • Related: see the other Polygon wallet endpoints for balances, token holdings, and transaction history under /v1/polygon/wallet/.