> For the complete documentation index, see [llms.txt](https://onchainlabs-tech-documentation.gitbook.io/wallettwo-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onchainlabs-tech-documentation.gitbook.io/wallettwo-documentation/api/nfts.md).

# NFTs

## List NFTs

Returns all NFTs owned by a wallet on a given network. Backed by Moralis.

### Endpoint

```
GET https://api.wallettwo.com/blockchain/v1/api/nft
```

### Authentication

This endpoint is authenticated with an API key. Pass it in the `x-api-key` header.

```
x-api-key: <YOUR_API_KEY>
```

If the header is missing or the key fails verification against the WalletTwo auth service, the request is rejected.

### Query parameters

| Name      | Type             | Required | Description                                                                                                                  |
| --------- | ---------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `address` | string           | Yes      | Wallet address to list NFTs for.                                                                                             |
| `chainId` | string \| number | Yes      | Decimal chain ID of the network (e.g. `1` for Ethereum, `137` for Polygon). Must match a network registered in the database. |
| `cursor`  | string           | No       | Pagination cursor returned by a previous call. Omit on the first page.                                                       |
| `order`   | string           | No       | Sort order, `ASC` or `DESC`. Defaults to `DESC`.                                                                             |
| `limit`   | number           | No       | Page size. Defaults to `100`.                                                                                                |

### Example request

```bash
curl -X GET "https://api.wallettwo.com/blockchain/v1/api/nft?address=0xabc...&chainId=1&limit=25" \
  -H "x-api-key: $WALLETTWO_API_KEY"
```

### Example response

```json
{
  "page": 0,
  "page_size": 25,
  "cursor": "eyJhbGciOi...",
  "result": [
    {
      "token_address": "0x...",
      "token_id": "1234",
      "contract_type": "ERC721",
      "owner_of": "0xabc...",
      "name": "CryptoPunks",
      "symbol": "PUNK",
      "metadata": "{\"name\":\"Punk #1234\",\"image\":\"ipfs://...\"}",
      "normalized_metadata": {
        "name": "Punk #1234",
        "description": "...",
        "image": "ipfs://..."
      }
    }
  ]
}
```

The response mirrors the Moralis NFT list payload with the upstream `status` field stripped out.

### Errors

| Status | Reason                                                               |
| ------ | -------------------------------------------------------------------- |
| 400    | `Address is required` — missing `address` query param.               |
| 400    | `Network ID is required` — missing `chainId` query param.            |
| 400    | `Network with chainId <id> not found` — `chainId` is not registered. |
| 401    | `x-api-key header missing.`                                          |
| 401    | `Invalid API key.` — key failed upstream verification.               |

### Pagination

Use the `cursor` field from the response as the `cursor` query param on the next call. When the response omits `cursor` (or returns an empty string), you have reached the end of the list.
