We're now supporting Polygon zkEVM!
Learn more here.

Contents

qn_getTransfersByNFT (v2) 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.

Please note that this RPC method requires the Token and NFT API v2 bundle add-on enabled on your QuickNode endpoint.

Parameters:

  1. array - An array with the first element being:

    object - A custom object with the following fields:

    collection - string - The contract address of the NFT collection

    collectionTokenId - string - The Token ID of this NFT under this collection

    page - integer - (optional) The page number you would like returned. The page numbers start at 1 and end at totalPages. If omitted, defaults to the first page (page 1). If the page number requested is higher than totalPages, an empty transfers array will be returned. If the page number requested is less than 1, an invalid params response will be returned

    perPage - integer - (optional) The maximum amount of NFT tokens to return on each page. You can request up to 100 items per page. If omitted, defaults to 40 items per page

Returns:

  1. object - The custom response object, or null if no NFTs are found:

    collection - The contract address we checked for NFTs

    transfers - An array of transfers representing NFTs with the following shape:

    date - The date when this transaction was mined

    from - The address for the sender of this transaction

    to - The address for the receiver of this transaction

    blockNumber - The block number this transaction was included in

    txHash - The token transfer transaction hash

    totalPages - The total number of results pages available

    pageNumber - The page number of results that was returned with this response

    totalItems - The total number of results

Code Examples:

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/', request_kwargs=OPTIONS))
resp = w3.provider.make_request('qn_getTransfersByNFT', [{
  "collection": "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
  "collectionTokenId": "1",
  "page": 1,
  "perPage": 10
}])
print(resp)
Ready to get started? Create a free account