Register and show off your project at Ethereum QuickPitch and win $10,000. Apply now

Contents

qn_fetchNFTCollectionDetails RPC method

The API credit value for this method is 4 . To learn more about API credits and each method's value, visit the API Credits page.

Currently supports ERC-721 and ERC-1155 compliant contracts (on Ethereum mainnet).

Headers:

  1. x-qn-api-version — (Integer - optional) Provide an optional request header specifying the QuickNode API version you're targeting. Using this header is recommended as it will become mandatory (required) in the future. Current API version is 1.

Parameters:

  1. Object — Custom Object with the following fields:

    contracts — (Array of Strings) List of NFT contract addresses you'd like to get collection details data from. You may include up to 10 contract addresses per request.

Returns:

  1. Object — Custom Response Object, or null if no NFT Collections are found:

    name — The name of this collection.

    description — The description of this NFT collection.

    address — The contract address we checked.

    genesisBlock — The block in which this contract was deployed.

    genesisTransaction — The hash of the transaction in which this contract was deployed.

    erc721 — Boolean (true,false)

    erc1155 — Boolean (true,false)

Code Examples:

from web3 import Web3, HTTPProvider
OPTIONS = {
  'headers':
    {
      'x-qn-api-version': '1'
    }
}
w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/', request_kwargs=OPTIONS))
resp = w3.provider.make_request('qn_fetchNFTCollectionDetails', {
  "contracts": [
    "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
    "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7"
  ]
})
print(resp)
Ready to get started? Create a free account