API Reference

getContractMetadata - NFT API

Queries NFT high-level collection/contract level information

This endpoint is supported only on the following chains and networks:

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

Parameters

  • contractAddress: [string hexadecimal] - contract address for the NFT collection

Returns

  • address: [string hexadecimal] contract address for the queried NFT collection
  • contractMetadata: [object]
    • name: [string] NFT contract name
    • symbol: [string] NFT contract symbol abbreviation
    • totalSupply: [string] total number of NFTs in a given NFT collection
    • tokenType: [string] "CRC-721" or "ERC-721" NFT token type

NOTE:
The name, symbol, and totalSupplyfields will only be set in the response if the contract implements functions to return each field.

Example

Conflux Core

Request

curl 'https://cfx-core.unifra.io/v1/4bd2d1249e644ae288dbfd4e076f0141/nft-api/getContractMetadata?contractAddress=0x8659e2ac138b83c60f3e555fa8f7cc8b25826927'

Response

{ "Address":"cfx:acdfx2zpcsf2hvuth3mz9mh13wfwnaxke6yzdme24e", "contractMetadata":{ "name":"无限“荟”聚 金卡", "symbol":"WXHJJK" } }

Conflux eSpace

Request

curl 'https://cfx-espace.unifra.io/v1/4bd2d1249e644ae288dbfd4e076f0141/nft-api/getContractMetadata?contractAddress=0x324021590bbdd427f104953bb06999d55f230c64'

Response

{ "Address": "0x324021590bbdd427f104953bb06999d55f230c64", "contractMetadata": { "name": "HONG KONG DIRL PASS", "symbol": "HKDIRL" } }
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