Contents

qn_fetchNFTCollectionDetails RPC method

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 - (String - optional) 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:

    address - The contract address we checked.

    name - the name of this collection.

    description - the description of this NFT collection.

    genesisBlock - the block in which this contract was deployed.

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

    erc1155 - boolean (true,false)

    erc721 - boolean (true,false)

Code Examples:

# The ethereum.rb library does not support including additional request headers, so you won't be able to add the x-qn-api-version header.
require 'ethereum.rb'
client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/')
response = client.send_command('qn_fetchNFTCollectionDetails', {
  contracts: [
    "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
    "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7"
  ]
})
puts response["result"]
Ready to try QuickNode? Start your 7-day free trial