DEV Community

Cover image for Development of Web3 Wallet Tracker with NFTScan NFT API
NFT Research
NFT Research

Posted on

Development of Web3 Wallet Tracker with NFTScan NFT API

Web3 wallet trackers provide comprehensive wallet analysis and tracking tools for cryptocurrency asset investors by integrating blockchain data APIs. Users can use wallet trackers to track the total assets and transaction history of specific wallet addresses, analyze historical transactions to discover trading trends, set asset price alerts, generate wallet reports, and mark important wallet addresses. Wallet trackers support cross-chain asset tracking and have wide data coverage. They have become an essential tool in the cryptocurrency market.

When developing a Web3 wallet tracker, various types of data need to be processed, and there may be challenges in integrating and processing this data, including but not limited to the following basic data:

1/ Blockchain transaction data: It is necessary to obtain and parse transaction data on the blockchain. This may involve handling transaction formats from different blockchain networks and addressing issues such as transaction confirmations and confirmations.

2/ Blockchain state data: In addition to transaction data, it may be necessary to obtain other state data on the blockchain, such as the state of smart contracts or the current state of on-chain assets.

3/ User wallet data: It is necessary to obtain the asset balance and transaction history of user wallet addresses. This involves interacting with users’ wallets and ensuring the security and privacy protection of the data.

4/ Real-time price data: To display the real-time value of assets, it is necessary to obtain price data for cryptocurrencies. This may involve integrating with multiple exchanges or price data providers and handling price data from different sources.

5/ Data security: As sensitive user data, such as private keys or transaction history, is involved, it is necessary to ensure the data security of the tracker, such as encrypted data transmission and secure storage.

NFTs are a special form of cryptocurrency asset with uniqueness and non-fungibility on the blockchain. They have wide applications in digital art, gaming, and collectibles, and the rapid growth of the NFT market has been a significant trend in the digital asset field in recent years.

In this context, NFTScan NFT API provides powerful tools for developers to easily and quickly access and analyze comprehensive data on the NFT market. As a leading global NFT data infrastructure service provider, NFTScan can provide strong support for Web3 wallet trackers. Its NFT API allows developers to access NFTScan’s data through simple HTTP requests and integrate it into their applications.

Image description

Using NFTScan NFT API, a Web3 wallet tracker can fetch real-time detailed data on relevant NFT collections and assets, including:

NFT Collection data: A Web3 wallet tracker can retrieve detailed information about specific NFT collections, including collection names, creator information, descriptions, and metadata.
NFT owner data: A Web3 wallet tracker can retrieve real-time information about the owners of specific NFTs, including their wallet addresses, the number of NFTs they hold, and the specific NFTs they own. This helps users understand the current ownership of a particular NFT and analyze the distribution of ownership.
NFT transaction history data: A Web3 wallet tracker can retrieve the transaction history data of specific NFTs, including the transaction participants, transaction time, transaction amounts, etc. This helps users understand the transaction history of NFTs, including transaction frequency and price trends.
Price data: It can fetch the current floor price of a specific NFT collection. This helps users understand the lowest trading price for NFTs in the current market as a reference value.
Overall transaction volume: It can retrieve the overall transaction volume of an NFT project, i.e., the cumulative number of transactions or transaction amounts of all NFTs in that collection. This helps users understand the market activity and liquidity of NFTs.
In addition, NFTScan API can also provide details of the circulation of NFT assets between different wallets, allowing the monitoring of major NFT trading trends, especially monitoring whale wallets or institutional wallets. Furthermore, NFTScan’s NFT indexing and search capabilities enable wallet trackers to quickly locate specific NFTs and retrieve their historical transaction and circulation information.

Image description

Accessing NFTScan NFT API
Before using the NFTScan API, developers need to visit the developer's website and create an account. Go to the official NFTScan Developer website and click the “Sign Up” button in the top right corner to register.

https://developer.nftscan.com/user/signup

After successful registration, developers can start using the API service. On the Dashboard page, developers can view statistics on their API usage, helping track historical usage data. In addition, NFTScan provides 1M CU of API calls to each registered developer, which can be used to request all NFT API interfaces, and the CU never expires until it runs out!

Find your unique API KEY and copy it. Visit the API documentation and enter your API KEY in the appropriate location as instructed in the documentation. Then, you can start using the API service. In the API documentation, developers can find a variety of interface modes to choose from and select the most suitable interface based on their needs.

Image description

Check NFT API Documentation
Once you have successfully registered as a developer and obtained the API Key, you need to check the NFTScan API documentation. The API documentation includes all available API endpoints and parameters, as well as detailed information on how to construct requests and handle responses. Please read the API documentation carefully and make sure you understand how to use the API to obtain the data you need. NFTScan API aims to help developers improve their experience of obtaining NFT data.

NFTScan currently has the largest and most comprehensive NFT collection library in the entire network and supports full NFT data from 22 blockchains, including Ethereum, Solana, BNBChain, Bitcoin, TON, Polygon, zkSync, Aptos, Linea, Base, Avalanche, Arbitrum, OP Mainnet, Starknet, Scroll, Mantle, Viction, Fantom, Moonbeam, PlatON, Cronos, and Gnosis. It provides a complete set of interfaces to obtain ERC721 and ERC1155 assets, transactions, projects, and market statistics. It currently supports 60+ public interfaces for EVM-compatible chains, as well as a batch of interfaces for Solana, Aptos, Bitcoin, and TON, which greatly satisfies developers’ needs to index multiple types of NFT data.

Image description

For example, to retrieve EVM interface Account Overview Statistics, you can use the “/v2/statistics/overview/{account_address}”. Enter the copied API KEY, click “Try It,” and the data is as follows, a total of 16 data retrived:

  • Hold value: 613.9696
  • ETH Purchase value: 212.81
  • ETH Sale value: 755.07
  • ETH Gas cost: 0.95
  • ETH Hold value (USDT): 1,789,494.22
  • Purchase value (USDT): 620,262.41
  • Sale value (USDT): 2,200,749.67
  • Gas cost (USDT): 2,768.9
  • Hold quantity: 652
  • Mint quantity: 297
  • Purchase quantity: 8
  • Sale quantity: 88
  • Send quantity: 105
  • Receive quantity: 657
  • Destroy quantity: 23
  • Collect quantity: 373

Image description

Building NFT API Requests
To start using the NFTScan API, developers need to write API request code based on the chosen programming language and use the request parameters and response data format provided in the NFTScan API documentation to construct the requests.

Here are the steps to build an NFT API request:

1/ Select a programming language: Developers need to choose a programming language they are familiar with or prefer to write the API request code. Common choices include Python, JavaScript, Java, etc. Make sure the selected programming language supports HTTP requests.

2/ Import the required HTTP library: Depending on the chosen programming language, developers need to import the corresponding HTTP library to send HTTP requests and handle responses. For example, in Python, you can use the requests library, and in JavaScript, you can use the Axios library.

3/ Build the API request: Based on the information provided in the NFTScan API documentation, developers need to construct the API request. This includes the following aspects:

  • Choose the API interface: Select the desired API interface from the API documentation, which refers to specific functionality or data to be accessed.
  • Determine the request method: Decide which HTTP request method to use, such as GET, POST, etc.
  • Set request parameters: Set the required parameters for the request based on the instructions in the API documentation. This may include query parameters, request body data, etc.
  • Configure request headers: Set the headers of the HTTP request as needed, such as authorization information, content type, etc.
  • Send the request: Use the imported HTTP library to send the constructed request and retrieve the response data.
  • Handle the response: Parse the response data according to the API’s response format (usually JSON or XML), extract the desired information, and further process or display it as required by the application.

4/ Process API response: Once the API response is received, developers need to handle the response data. This includes parsing JSON or XML data, extracting the required information, and further processing or displaying it according to the application’s needs.

For example, to retrieve Account Overview Statistics “/v2/statistics/overview/{account_address}” for the address 0xca1257ade6f4fa6c6834fdc42e030be6c0f5a813 using an HTTP GET request to the API endpoint, you can use the Python requests library to build the request code.

`import requests

Set API endpoint and account address

api_endpoint = "https://api.nftscan.com/v2/statistics/overview/"
account_address = "0xca1257ade6f4fa6c6834fdc42e030be6c0f5a813"

Build the complete API request URL

url = api_endpoint + account_address

Send HTTP GET request

response = requests.get(url)

Check if the request was successful

if response.status_code == 200:
# If successful, parse the response data
data = response.json()
# Handle the response data, further processing or display can be done here
print(data)
else:
# If the request failed, print the error message
print("Request failed, status code:", response.status_code)`

Developers can access NFT data according to their construction needs. NFTScan NFT API provides developers with powerful NFT data resources for building various NFT-related applications and solutions. Whether it is developing a simple NFT trading marketplace or a complex NFT ecosystem, NFTScan NFT API can provide developers with comprehensive NFT data required for their projects.

Image description

About NFTScan
NFTScan is the world’s largest NFT data infrastructure, including a professional NFT explorer and NFT developer platform, supporting the complete amount of NFT data for 22 blockchains including Ethereum, Solana, BNBChain, Arbitrum, Optimism, and other major networks, providing NFT API for developers on various blockchains.

Official Links:

NFTScan: https://nftscan.com

Developer: https://developer.nftscan.com

Twitter: https://twitter.com/nftscan_com

Discord: https://discord.gg/nftscan

Top comments (0)