API Reference

getNFTs - NFT API

Gets all NFTs currently owned by a given address.

This endpoint is supported on the following chains and networks:

  • Conflux Core: cfx-core
  • Conflux eSpace: cfx-espace

Parameters

  • owner: [string] address for NFT owner
  • page [number] page number
  • limit [number] max number of results. Max limit 200
  • contractAddresses[]: [array of strings] (optional) Array of contract addresses to filter the responses with. Max limit 20 contracts.

Returns (by default)

  • ownedNfts: List of objects that represent NFTs owned by the address.
    • Object schema:
      • contract:
        • address: address of NFT contract
      • id:
        • tokenId: Id for NFT (hex)
        • tokenMetadata
          • tokenType: "CRC721" or "ERC721"
      • title: name of the NFT asset
      • description: brief human-readable description
      • tokenUri:
        • raw: Uri representing the location of the NFT's original metadata blob. This is a backup for you to parse when the metadata field is not automatically populated.
        • gateway: Public gateway uri for the raw uri above.
      • metadata: Relevant metadata for NFT contract. This is useful for viewing image url, traits, etc. without having to follow the metadata url in tokenUri to parse manually.
        NOTE:Not all metadata fields may be filled in if the provided NFT contract does not contain relevant information.
        • nameName of the NFT asset.
        • description: Human-readable description of the NFT asset. (Markdown is supported/rendered on OpenSea and other NFT platforms)
        • image: URL to the NFT asset image.
  • totalCount: Total number of NFTs owned by the given address.

Examples

Conflux Core

Request

curl 'https://cfx-core.unifra.io/v1/cf455a9802364d88b8f87b5273d9ddbb/nft-api/getNFTs?owner=0x19241022053a3e2236c48E86B62957C8654B65a1'

Response

{ "ownedNfts": [ { "contract": { "address": "cfx:acb7hr0ecyatev5gzjnys9mt31xxa22hzuzb3tprps" }, "id": { "tokenId": "65162", "tokenMetadata": { "tokenType": "CRC-721" } }, "title": "传说款:篮球飞人", "tokenUri": { "raw": "https://nft.taopainft.com/v1/token/metadata/870Cda3Dfe708aC0c993fb1fF423A243ca0ca94E/fe8a.json", "gateway": "https://nft.taopainft.com/v1/token/metadata/870Cda3Dfe708aC0c993fb1fF423A243ca0ca94E/fe8a.json" }, "metadata": { "name": "传说款:篮球飞人", "description": "", "image": "https://taopainft.oss-cn-hangzhou.aliyuncs.com/%E4%BD%9B%E7%B3%BB%E6%83%A0%E4%BA%8C_0x870cda3dfe708ac0c993fb1ff423a243ca0ca94e/7.4%E5%8B%8B%E7%AB%A0%E7%A9%BA%E6%8A%95/%E4%BD%9B%E7%B3%BB%E4%BC%A0%E8%AF%B4%E6%AC%BE/%E4%BC%A0%E8%AF%B4%E6%AC%BE%EF%BC%9A%E7%AF%AE%E7%90%83%E9%A3%9E%E4%BA%BA.jpg" }, "timeLastUpdated": "2022-07-14T16:28:31.821964Z" } ... ], "totalCount": 229281 }

Conflux eSpace

Request

curl 'https://cfx-espace.unifra.io/v1/4bd2d1249e644ae288dbfd4e076f0141/nft-api/getNFTs?owner=0x9ebaf541b126e9527b583912815409271d9a739d'

Response

{ "ownedNfts": [ { "contract": { "address": "0xaa0e817028fd64f1f2048ab0751158583a686332" }, "id": { "tokenId": "0x000000000000000000000000000000000000000000000000000000000000000a", "tokenMetadata": { "tokenType": "ERC-721" } }, "tokenUri": { "raw": "%7B%22name%22%3A+%22Nucleon+GP+NFT+No.10%22%2C+%22description%22%3A+%22Nucleon%3A+UNLEASHING+LIQUIDITY+FOR+STAKED+ASSETS%2C+this+NFT+is+for+Genesis+Participants%21%22%2C+%22image%22%3A+%22ipfs%3A%2F%2FQmXfajz6N1xL6TEGBrH9GSJZFV6FqsmpgHvCtf3ofts7aa%22%7D", "gateway": "%7B%22name%22%3A+%22Nucleon+GP+NFT+No.10%22%2C+%22description%22%3A+%22Nucleon%3A+UNLEASHING+LIQUIDITY+FOR+STAKED+ASSETS%2C+this+NFT+is+for+Genesis+Participants%21%22%2C+%22image%22%3A+%22ipfs%3A%2F%2FQmXfajz6N1xL6TEGBrH9GSJZFV6FqsmpgHvCtf3ofts7aa%22%7D" }, "timeLastUpdated": "2024-04-15T22:22:06.007242Z" }, { "contract": { "address": "0xa71219cf202641d88f565b63a4025044707cb80a" }, "id": { "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000002", "tokenMetadata": { "tokenType": "ERC-721" } }, "title": "BRONZE PASS", "description": "EARN 0.2%", "tokenUri": { "raw": "ipfs://QmVzNo84hdJRCknVwRLBdFyBPnBVoFatLhmunMWcmv8hLa/0", "gateway": "ipfs://QmVzNo84hdJRCknVwRLBdFyBPnBVoFatLhmunMWcmv8hLa/0" }, "metadata": { "background_color": "", "description": "EARN 0.2%", "external_url": "", "image": "ipfs://QmadqQMUezQPnE3j5J36DttmczUbwfSS4TbWgFv4dpuK5y/fotor_2023-3-17_7_53_34.jpg", "name": "BRONZE PASS" }, "timeLastUpdated": "2024-04-16T01:18:53.385762Z" }, { "contract": { "address": "0x50c85f4cd2c07b843513fb63f5b159059d325b11" }, "id": { "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000048", "tokenMetadata": { "tokenType": "ERC-721" } }, "title": "MysticBirds #72", "description": "Moonbirds is not enough we need more birds", "tokenUri": { "raw": "ipfs://QmYXcuKs5R3FUk7f8H7BsqRiNBr6uqJmdo9nyxBavcjFh4/72", "gateway": "ipfs://QmYXcuKs5R3FUk7f8H7BsqRiNBr6uqJmdo9nyxBavcjFh4/72" }, "metadata": { "attributes": [ { "trait_type": "Body", "value": "Sage Brown" }, { "trait_type": "Eyes", "value": "Open Blue" }, { "trait_type": "Beak", "value": "Ruby" }, { "trait_type": "Eyewear", "value": "None" }, { "trait_type": "Outerwear", "value": "None" }, { "trait_type": "Headwear", "value": "Forest Ranger" } ], "compiler": "HashLips Art Engine", "date": 1681648819969, "description": "Moonbirds is not enough we need more birds", "dna": "968d82cf55b91e7ce9d891edc4dc42036658014f", "edition": 72, "image": "ipfs://QmTt34P2G4EnhHQ9vbq2Mnn2S4KDRsND9xeJ5XwxE2oNym/72.png", "name": "MysticBirds #72" }, "timeLastUpdated": "2024-04-16T01:29:53.867418Z" }, { "contract": { "address": "0x9b338a9c6f1d61c74b59e30927c18f1d56eb9e4a" }, "id": { "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000590", "tokenMetadata": { "tokenType": "ERC-721" } }, "tokenUri": { "raw": "ipfs://bafyreieht5stsi3cnwlztd4qz2wxkyxjvoqr3qxzxsqqbjz52k7ypq7zqy/metadata.json", "gateway": "ipfs://bafyreieht5stsi3cnwlztd4qz2wxkyxjvoqr3qxzxsqqbjz52k7ypq7zqy/metadata.json" }, "timeLastUpdated": "2024-04-16T05:52:24.331569Z" } ], "totalCount": 4 }

Path Params
string
required
Query Params
string
Responses

Language
URL
Click Try It! to start a request and see the response here! Or choose an example:
application/json