AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.

Start building today!     

Contents

qn_getTransfersByNFT 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 NFT Fetch Tool add-on enabled on your QuickNode endpoint. This method is currently supported on ERC-721 compliant contracts (on Ethereum mainnet).

Parameters:

  1. object - The 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:

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_getTransfersByNFT",
    "params":{
      "collection": "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
      "collectionTokenId": "1",
      "page": 1,
      "perPage": 10
    }
  }'
Ready to get started? Create a free account