🧝♂
How to Use BlockVision's API service to Track your NFTs
With this guide, you will learn how to take advantage of BlockVision's Powerful APIs to check any information you want to know without scanning the entire chain.

Step 1: Create your App on BlockVision

Enter BlockVision's dashboard and click "App" on the sidebar, you'll see guiding page like the following picture. Now create your app by clicking "Create your App now"
If you have finished reading How to create App in previous tutorial, just skip to Step 3.

Step 2: Name your app with a brief description and configure your app's network.

In the previous tutorial, we created ERC-20 Token and minted our NFT on Rinkeby. We'll create an App on Rinkeby network to show you how it works.
Once you have create your app, you'll see it in "MyApp" List. Now use the API Key to check our information.

Step 3: Check our information in BlockVision's Console

In the previous tutorial, we created our NFT contract and deploy on Rinkeby. Then we mint our first NFT with ERC-721 standard.
  • Our contract address: 0x356613282dbfbdf8c9732e65dac24cbd3e518f97
  • Our account address: 0x42f58a73e8d1abcde3d9ae90d7871515dae61c3b
Select Method nft_transfers and paste the request parameters with our information. Send the request and check the result of the response.
You can see the transfer's info easily and clearly. Not only method nft_transfers is provided, but also your transaction information is checked by using other power APIs that BlockVision provides such as nft_contractStats API.

Step 4: Have A Try On BlockVision Powerful API

nft_contractStats

BlockVision's nft_contractStats offers you a method to summarize contract which is relevant to the NFT info in the response, so you can get an overview of the NFT contract's info easily.
In our previous operation in How to mint your own ERC-721 Non-Fungible Token(NFT), we minted our NFT by filtering the ERC-721 Token's contract address, we can see the overview info clearly in a specific block number.
curl --location --request POST 'apis.blockvision.org/v1/<your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_contractStats",
"params": {
"contractAddress":"0x31d911bf5945644115bd20382acadc399175e117",
"blockNumber": 10348070,
}
}'
Here is the response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
We use 10348070 ,the number of the block ,as the filter condition. As we can see from the response, the result is empty. Let's check it on Etherscan Rinkeby.
When the block number was 10348070, we have just deployed the contract, and no NFT operation occurred, so the result returned by the API was empty.
Then we mint an NFT and set the "blockNumber" field to zero in the request. Then by default, it will return the latest result.
Let's have a try.
curl --location --request POST 'apis.blockvision.org/v1/<your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_contractStats",
"params": {
"blockNumber": 0,
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97"
}
}'
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"activeAddress": 1,
"totalTransfer": 1
}
}
If BlockNumber is not set to 0 in the request, then BlockVision's API can be used as a snapshot of contract overview information. According to this information, you can easily get a historical overview of NFT contract information.

nft_accountStats

On the other hand, if you want to know the snapshot overview information of specific NFT in a single account, you can also use the nft_accountStats API provided by BlockVision to obtain the history information of NFT overview by the account. As above, we can filter and query snapshot by setting the blockNumber field value in the nft_accountStats request.
As is shown below:
curl --location --request POST 'apis.blockvision.org/v1/<your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_accountStats",
"params": {
"blockNumber": 10348070,
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97",
"accountAddress": "0x42f58a73E8D1ABcde3D9ae90D7871515daE61c3b"
}
}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Similarly, if we set the value of the blockNumber field to zero, it will return the latest information of the account. According to different block numbers, we can clearly track the historical changes of the account's ERC-721 NFT overview.
As is shown below:
curl --location --request POST 'apis.blockvision.org/v1/<your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_accountStats",
"params": {
"blockNumber": 0,
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97",
"accountAddress": "0x42f58a73E8D1ABcde3D9ae90D7871515daE61c3b"
}
}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"totalTransfer": 1
}
}

Step 5: Try It On BlockVision Console

If you just need a simple query about your information, we highly recommend you to use BlockVision's Console for query operations.
Just within several clicks, you will see the information you need.
Navigate to BlockVision Console, pick a suitable network and make the request:
Then the response will shown below the "Send Request" Button:
Now you know how to take advantage of BlockVision's APIs. Take your journey and explore more by yourself! 😃
Copy link
Outline
Step 1: Create your App on BlockVision
Step 2: Name your app with a brief description and configure your app's network.
Step 3: Check our information in BlockVision's Console
Step 4: Have A Try On BlockVision Powerful API
nft_contractStats
nft_accountStats
Step 5: Try It On BlockVision Console