NFTs
List NFTs
NFT holdings for one address on one mainnet chain.
Endpoint
GET/v1/nfts
Query
| Field | Required | Description |
|---|---|---|
| chainId | Yes | Single mainnet chain id (e.g. ethereum, base) |
| address | Yes | Wallet or contract owner address on that chain |
Request
curl -sS "https://blockchain.gray3.io/v1/nfts?chainId=ethereum&address=0xYourAddress" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret"Response
HTTP 200 — success envelope wraps the payload in data.
json
{
"data": {
"chainId": "ethereum",
"address": "0xYourAddress",
"items": [
{
"chainId": "ethereum",
"contract": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
"tokenId": "1234",
"name": "BAYC #1234",
"imageUrl": "https://ipfs.io/ipfs/…"
},
{
"chainId": "ethereum",
"contract": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
"tokenId": "5678",
"name": "BAYC #5678",
"imageUrl": "https://ipfs.io/ipfs/…"
}
],
"source": "indexer"
}
}One HTTP call returns all indexed NFTs for that address on that chain. There is no cursor on this route—if you need progressive loading, paginate in your UI after grouping (see Collections and metadata).
Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
Every authenticated route may also return unauthorized (401), revoked_secret (401), forbidden (403), credits_exhausted (402), plan_feature_denied (403), rate_limit_exceeded (429, retryable), and invalid_argument (413) for request bodies over 256 KiB.
| Code | HTTP | When |
|---|---|---|
| unsupported_capability | 400 | Testnet chain id or feature disabled on testnets (prices, NFTs, DeFi, swap) |
| invalid_argument | 400 | Missing or malformed chainId, address, or body fields |
| plan_chain_denied | 403 | chainId is not on the project plan |
| chain_disabled | 403 | Chain turned off in Console › Networks |
| unsupported_capability | 400 | Capability not offered for this chain (e.g. testnet prices) |
| nft_unavailable | 503 | NFT indexer failed (retryable) |
json
{
"error": {
"code": "unsupported_capability",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}