We're now supporting Polygon zkEVM!
Learn more here.
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.
Please note that this RPC method requires the NFT Fetch Tool add-on enabled on your QuickNode endpoint. This method is currently supported on ERC-721 and ERC-1155 compliant contracts (on Ethereum mainnet).
Parameters:
contracts - string - An array with the 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:
name - The name of this collection
description - The description of this NFT collection
address - The checked contract address
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)
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); myHeaders.append("x-qn-api-version", "1"); var raw = JSON.stringify({ "id": 67, "jsonrpc": "2.0", "method": "qn_fetchNFTCollectionDetails", "params": { "contracts": [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7" ] } }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
require "uri" require "json" require "net/http" url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request["x-qn-api-version"] = "1" request.body = JSON.dump({ "id": 67, "jsonrpc": "2.0", "method": "qn_fetchNFTCollectionDetails", "params": { "contracts": [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7" ] } }) response = https.request(request) puts response.read_body
curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \ -X POST \ -H "Content-Type: application/json" \ -H "x-qn-api-version: 1" \ --data '{ "id":67, "jsonrpc":"2.0", "method":"qn_fetchNFTCollectionDetails", "params":{ "contracts": [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7" ] } }'
const ethers = require("ethers"); (async () => { const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/"); provider.connection.headers = { "x-qn-api-version": 1 }; const heads = await provider.send("qn_fetchNFTCollectionDetails", { contracts: [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7", ], }); console.log(heads); })();
# The eth.rb library does not support including additional request headers, so you won't be able to add the x-qn-api-version header. require 'eth' client = Eth::Client.create 'http://sample-endpoint-name.network.quiknode.pro/token-goes-here/' payload = { "jsonrpc": "2.0", "method": "qn_fetchNFTCollectionDetails", "params": { "contracts": [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7" ] }, "id": "1" } response = client.send(payload.to_json) puts response
import requests import json url = "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/" payload = json.dumps({ "id": 67, "jsonrpc": "2.0", "method": "qn_fetchNFTCollectionDetails", "params": { "contracts": [ "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7" ] } }) headers = { 'Content-Type': 'application/json', 'x-qn-api-version': '1' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)