Cointime

Download App
iOS & Android

Guide: How to Develop Web3 DApps on Blast Network Using NFTScan NFT API

Validated Project

Blast is a Layer2 network launched by Blur, or more specifically by Pacman, the founder of Blur. It is a second-layer network based on Optimistic Rollups technology and is compatible with Ethereum, allowing Ethereum developers and dApps to easily connect to it. Users can obtain passive income by cross-chain assets to the Blast network. Blast opens up new business models for the ecosystem of dApps. ETH and stablecoins that are cross-chained to Blast will automatically generate income. DApps can easily monetize their deposits through a single configuration.

According to data from NFTScan, as of March 21, the Blast Network has issued a total of 915,822 NFT assets, with 1,275 NFT Collections, generating 1,644,848 interaction records. There have been 265,950 wallet addresses that have interacted with the network, with a total trading volume of 2,554.23 ETH.

Blast NFTScan: https://blast.nftscan.com/

Before using the NFTScan API, you need to visit the developer’s website and create an account. Go to the NFTScan official website and click the “Sign Up” button for the NFTScan API to register.

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

After logging in, find your unique API KEY on the Dashboard. Visit the API documentation and enter your API KEY in the appropriate location. Follow the instructions in the documentation to start using the API service. In the API documentation, developers can find various interface modes to choose from and select the most suitable one based on their needs.

In the Dashboard, developers can also view statistical data on their API usage, which helps track historical usage data. Additionally, NFTScan provides 1M CU of API call service to all registered developers for requesting all NFT API interfaces, and the CU never expires until it is used up!

After successfully registering a developer account and obtaining an API Key, you need to review the NFTScan API documentation. The API documentation contains all the available API endpoints and parameters, as well as detailed information on how to construct requests and handle responses. Read the API documentation carefully and ensure that you understand how to use the API to retrieve the data you need. The NFTScan API service is designed to help developers improve their experience of obtaining NFT data analysis.

NFTScan currently has the largest and most comprehensive NFT Collection library in the entire network. It supports full data of NFTs from Ethereum, Solana, BNBChain, Bitcoin, TON, Polygon, zkSync, Aptos, Linea, Base, Avalanche, Arbitrum, OP Mainnet, Starknet, Scroll, Viction, Fantom, Moonbeam, PlatON, Cronos, and Gnosis, 23 blockchain in total. It covers a wide range of NFT data and provides a set of interfaces to obtain ERC721 and ERC1155 assets, transactions, projects, market statistics, and more. It now supports over 60 public interfaces for EVM-compatible chains, as well as a set of interfaces for Solana, Aptos, Bitcoin, and TON with the same model, which largely meets the needs of developers to index various types of NFT data.

The Blast NFT API includes three main models, providing developers with detailed information and descriptions of the core fields within these models. This enables developers to retrieve data and utilize the information to serve their own Dapp services effectively.

Assets API: “Assets” represent the most crucial data fields within NFTs, uniquely identifying and describing digital assets. By extracting the “Assets” data from the Blast network, developers can gain comprehensive insights and build relevant applications. The “Assets” object provides the unique identification of digital assets, along with data about their entire lifecycle, laying the foundation for developers to understand and leverage NFTs.

Transactions API: The transactions model represents the complete history of all transactions related to an NFT asset on the blockchain, offering developers insights into the full lifecycle of NFT transactions. This includes minting, transfers, sales, and other transaction activities, allowing developers to gain an in-depth understanding of the flow and evolution of NFT assets within the Blast ecosystem. NFTScan continuously aggregates NFT transaction data from various blockchain networks, facilitating developers in tracking and understanding the dynamics of the NFT market. This data also assists developers in building NFT-based applications and tools.

Collections API: The Collections API provides NFTScan with off-chain data related to NFT collections, including descriptions, social media information, and other basic details. NFTScan retrieves this information through APIs provided by leading NFT markets across different blockchain networks. Additionally, the current floor price information is based on centralized data obtained through API from NFT market orders and is available for developers to access.

1/Retrieve Assets Series

  • Get NFTs by account (Retrieve NFTs using a wallet address)
  • Get all NFTs by account (Retrieve all NFTs associated with a wallet address and group them by contract address. If the total number of NFTs owned by the account exceeds 2000, the returned NFTs will be limited to 2000 or less. In such cases, developers and users can use pagination queries to retrieve all NFTs owned by the account.)
  • Get minted NFTs by account (Retrieve NFTs minted by a specific wallet address)
  • Get NFTs by contract (Retrieve NFTs using a contract address, sorted by token_id in ascending order)
  • Get single NFT (Retrieve details of a single NFT)
  • Get multiple NFTs (Retrieve details of multiple NFTs from different contract addresses simultaneously)
  • Search NFTs (This interface returns a list of NFT assets by applying search filters in the request body. Assets are sorted by nftscan_id in ascending order.)
  • Get NFTs by attributes (This interface returns a set of NFTs belonging to contract addresses with specific attributes. NFTs are sorted by token_id in ascending order.)
  • Get all multi-chain NFTs by account (This interface returns all multi-chain NFTs owned by a specific wallet address, grouped by contract address.)

Here we use the Get minted NFTs by account API “/v2/account/mint/{account_address}” to retrieve detailed information about the Minted NFTs under a wallet address. The path parameter includes the account_address for selection, and the query parameter includes the choice of erc721/erc1155 NFT assets. Here we are querying all erc721 NFTs minted under the address 0x87bc2f2ba8c83f412fed5c3151de0ffbdc959984.

2/ Retrieve Transactions Series

  • Get transactions by account (This interface returns a list of NFT transactions for a wallet address)
  • Get transactions by contract (This interface returns a list of NFT transactions for an NFT contract address
  • Get transactions by NFT (This interface returns a list of NFT transactions for a single NFT)
  • Search transactions (This interface returns a list of NFT transactions by applying search filters in the request body)
  • Get transactions by address (This interface returns a list of NFT transactions filtered by transaction parameters)
  • Get transactions by hash (This interface returns transaction records based on a list of transaction hashes)

Here we use the Get transactions by contract API “/v2/transactions/{contract_address}” to retrieve NFT transaction records for a specific NFT contract address. The query parameter allows you to select the NFT event types for transactions (Mint/Transfer/Sale/Burn) and you can use ‘;’ to separate multiple events.

Similarly, here we are retrieving the NFT transaction records for the BACGenesis. We are filtering by the Mint event type. The response data will contain all the key data of the items minted under this NFT Collection, such as transaction hash, From and To addresses, block information, gas consumption, transaction timestamp, and other characteristic information of NFT transactions.

3/ Retrieve Collections series

  • Get an NFT collection (Retrieve details based on the contract address of the collection, including an overview and categorization of items based on their descriptions, distribution of owners, average price, floor price, and other basic information)
  • Search NFT collections (This endpoint returns a list of Collection information by applying search filters in the request body. Collections are sorted in ascending order based on deployment block number)
  • Get NFT collections by account (This endpoint returns a list of collections associated with a given account address, sorted by floor price from highest to lowest)
  • Get NFT collections by ranking (This endpoint returns a list of collections with a given ranking field, sorted based on the given sorting field and sorting direction)

Here we use the Get an NFT collection API

“/v2/collections/{contract_address}” to retrieve detailed information about the NFT collection with the address 0xcfc4c2b14af5b1f8ed97e1717b009dca461d8461 and the name BACGenesis.

4/ Collection Statistics: Statistical Analysis for Collection

  • Collection Statistics (This interface provides an analytical overview of NFT Collection statistics)
  • Collection Trade Distribution (This interface primarily provides the distribution of project trades)
  • Collection Trending Statistics (Mainly returns trading statistics ranking for a project)
  • Collection Holding Amount Distribution (This interface can provide information on the distribution of NFT project holdings)
  • Collection Holding Period Distribution (Data returns information about the distribution of NFT project holding periods)
  • Collection Blue Chip Statistics (Overview statistics for blue-chip projects)
  • Collection Blue Chip List (List of blue-chip projects associated with the project, referring to NFTScan Blue Chip Collection)
  • Collection Top Holder (Distribution of the top holders of the Collection)

Here we use the Collection Top Holder API

“/v2/statistics/collection/holder/{contract_address}” to primarily return the distribution of holders for an NFT collection. You can refer to NFTScan Holders for an example:

https://blast.nftscan.com/0x71da4d5805c1f2ecce2a41a9f9e026287f2b1f39?module=Holders.

5/ Account Statistics Series

  • Account Overview Statistics (This interface returns an overview of statistical information for an account address, refer to NFTScan Overview)
  • Account Holding Distribution (This interface returns statistical information on the distribution of NFT holdings for an account address, refer to NFTScan Portfolio)
  • Account Holding NFT Trending (This interface returns statistical information on the trending NFT holdings or quantities for an account address, refer to NFTScan Portfolio)

6/ Analytic Statistics Series

This series of APIs is commonly used to retrieve data analysis and statistics-related information on the NFTScan Blast network, such as Trade Ranking and Mint Amount. Such APIs allow developers or users to query, analyze, and retrieve statistical data related to specific data sets or indicators and can be used for various purposes, including market analysis, trend tracking, investment decision-making, and understanding the nature of specific data.

https://blast.nftscan.com/

7/ Refresh Metadata

  • Refresh NFT metadata
  • Refresh NFT metadata by contract

Interfaces like Refresh Metadata can assist developers or users in submitting backend tasks to refresh metadata. Once reviewed, these tasks will refresh the specified item or the entire contract metadata.

8/ Other

  • Get the latest block number (Returns the latest block number reached by NFTScan)
  • Get NFT amount by account (Returns information on the quantity of ERC721 and ERC1155 NFTs owned by the account address specified in the request body)
  • Get NFT owners by contract (Returns a list of owners for the specified ERC721 NFT contract address, with NFTs sorted by token_id)
  • Get owners by an NFT (Returns a list of owners for the specified ERC1155 NFT, with NFTs sorted by account_address)

Developers can find the required Fantom API interface and parameters in the NFTScan API documentation. They can then use their chosen programming language, such as Python, Java, JavaScript, etc., to write the API request code.

Here we use the Get an NFT collection API endpoint

“/v2/collections/{contract_address}”

to retrieve details about the BACGenesis project on the Blast blockchain. The address we are querying is

0xcfc4c2b14af5b1f8ed97e1717b009dca461d8461.

To access the NFTScan API using an HTTP GET request in Python with the requests library, you can construct the request like this:

import requests# Set API endpoint and contract addressapi_endpoint = "https://api.nftscan.com/v2/collections/"contract_address = "0xcfc4c2b14af5b1f8ed97e1717b009dca461d8461"# Build the complete API request URLurl = api_endpoint + contract_address# Send HTTP GET requestresponse = requests.get(url)# Check if the request was successfulif 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)

This code sends an HTTP GET request to the NFTScan API using the requests library to retrieve the details of an NFT Collection for a specific contract address. After receiving the API response, the code checks if the request was successful. If successful, it parses the response data and processes it accordingly.

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 24 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

Join the NFTScan Connect Program

Comments

All Comments

Recommended for you

  • Bitcoin native application platform Arch developer completes $7 million seed round of financing, led by Multicoin Capital

    Bitcoin native application platform Arch developer Arch Labs announced the completion of a $7 million seed round of financing, led by Multicoin Capital, with participation from Portal Ventures, OKX Ventures, Big Brain Holdings, CMS Holdings and Tangent.

  • Tokenization platform AgriDex completes $5 million Pre-Seed round of financing

    AgriDex, a tokenization platform on the Solana blockchain, announced the completion of a $5 million Pre-Seed round of financing, led by Endeavor Ventures, with participation from African Crops Limited, Oldenburg Vineyards, and former Goldman Sachs and Citadel executive, Hank Oberoi. It is reported that AgriDex is expected to launch its platform and token, AGRI, in the third quarter of this year. According to its white paper, AgriDex has reserved 5% of the total token supply, or 50 million tokens out of 1 billion tokens, for airdrops.

  • UXUY Completes $7 Million Pre-A Round of Financing, with Investments from Binance Labs, Bitcoin Magazine, and Other Institutions

    UXUY, the next-generation decentralized multi-chain trading platform incubated by Binance Labs, announced the completion of a $7 million Pre-A round of financing. Since its establishment, its total financing amount has exceeded $10 million. UXUY is an important builder of the Bitcoin ecosystem, and more than 100,000 traders use Bitcoin Lightning Network services through UXUY. UXUY's current round of financing has received investment from well-known institutions in Asia, North America, and Europe, such as Binance Labs, UTXO Management (Bitcoin Magazine), JDI Ventures, Bixin Ventures, SWC Global, Matrix Partners, CMS Holdings, Dewhales Capital, Comma3 Ventures, Satoshi Labs, YBB Capital, GBV Capital, Web3Vision, Pentos Ventures, NGC Ventures, Alti5, Metalpha, and GSR. The funds raised by UXUY in this round will be used for the construction of the Bitcoin ecosystem infrastructure, and will be committed to promoting the efficient and low-cost trading of Lightning Network Taproot Assets, Ordinals BRC-20, Runes, and other assets. Jordan, co-founder of UXUY, said: "We are pleased to be strategic partners with all investors! This year, we have successfully built a bridge between the Bitcoin Lightning Network and the multi-chain ecosystem. UXUY will continue to promote the use cases and popularization of the Lightning Network in trading scenarios, and make more contributions to the Bitcoin ecosystem." According to RootData, a Web3 asset data platform, UXUY is a next-generation decentralized multi-chain trading platform based on MPC wallets. UXUY actively participates in the construction of the Bitcoin Layer2 ecosystem, fully integrates into the Bitcoin Lightning Network and Taproot ecosystem, provides Lightning Address DID services to users, and becomes an important bridge connecting the Bitcoin and Ethereum ecosystems. As a decentralized multi-chain trading platform, UXUY provides immediate cross-chain trading services for Coin, Token, and Inscription among public chains through the establishment of uPool.

  • AMA: AO and Artificial Intelligence

    The article is divided into two sections: the main dialogue between the host and Sam, and the Q&A session where community users ask questions about AO.

  • $HALO,World!

    Everything you want to know about the $HALO token

  • Exploring Core Chain and Its Core Competency

    This report examines Core Chain’s pivotal role in enhancing Bitcoin’s functionality, focusing on the core competencies of the Satoshi Plus Consensus mechanism, non-custodial BTC staking, and EVM compatibility.

  • MIIX Capital Crypto Weekly Report(0429-0505):Bottoming Phase Completed, Inflation Concerns Persist

    Crypto market saw decreased funding in April, signaling cautiousness among investors. Notable fundraises: Monad, Berachain, Auradine, Movement, Burnt.

  • Arweave Weekly Highlights Week 18 | ao Test Network Sends Over 50 Million Messages, $AOCRED Surges Nearly 15 Times

    Arweave's data from last week: The mainnet completed a total of 218,035,351 transactions, achieving 1.12 TiB of storage in a single week. This week, the storage cost is 0.748 AR/GiB, and there has been an increase of 659 on-chain addresses.

  • Beyond Zero-Knowledge: What’s Next for Data Privacy Enhancement?

    In this article, we delve into the significance of FHE and ZKP in enhancing blockchain application privacy, highlighting their potential to shape the future of data privacy in blockchain technology.

  • MIIX Capital Crypto Monthly Report - 2024.04

    Crypto market saw decreased funding in April, signaling cautiousness among investors. Notable fundraises: Monad, Berachain, Auradine, Movement, Burnt.