Skip to main content

List all transfers of a specific NFT

The REST API allows you to retrieve all transfers of a specific NFT by contract address and token ID with the following endpoint:

GET /networks/{chainId}/nfts/{tokenAddress}/tokens/{tokenId}/transfers

info

Refer to the reference documentation to learn more about this API.

Use cURL

Use the following curl command:

curl -X 'GET' \
-u <API-KEY>:<API-KEY-SECRET> \
'https://nft.api.infura.io/networks/1/nfts/0x1A92f7381B9F03921564a437210bB9396471050C/tokens/7421/transfers' \
-H 'accept: application/json'

You can also encode <API-KEY>:<API-KEY-SECRET> to Base64 string and run the command. For example, encode your API key and API key secret:

echo -n '<API-KEY>:<API-KEY-SECRET>' | base64

Run the curl command using your encoded credentials:

curl -X 'GET' \
'https://nft.api.infura.io/networks/1/nfts/0x1A92f7381B9F03921564a437210bB9396471050C/tokens/7421/transfers' \
-H 'accept: application/json' \
-H 'Authorization: Basic <BASE64-STRING>'

Use NodeJS

The following example uses Node.js to make calls to the REST endpoint:

index.js
const axios = require("axios");
require("dotenv").config();

const Auth = Buffer.from(
process.env.INFURA_API_KEY + ":" + process.env.INFURA_API_KEY_SECRET,
).toString("base64");

const chainId = "1";
const tokenAddress = "0x1A92f7381B9F03921564a437210bB9396471050C";
const tokenId = "7421";

(async () => {
try {
const { data } = await axios.get(
`https://nft.api.infura.io/networks/${chainId}/nfts/${tokenAddress}/tokens/${tokenId}/transfers`,
{
headers: {
Authorization: `Basic ${Auth}`,
},
},
);
console.log(":rocket: ~ file: index.js:20 ~ result:", data);
} catch (error) {
console.log(":rocket: ~ file: index.js:17 ~ error:", error);
}
})();