nft_contractStats
Allows you to easily fetch overall stats information of any NFT collection.
You can specify the contract address, then you can obtain how many transfer and approval events happening in that collection. Using this API, you could see the broad view of transfer and approval stream of certain NFT collection.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields (required):
  • contractAddress(hex string, required) - the contract address of the collection. BlockVision currently support both ERC721 and ERC1155.
  • blockNumber(integer number, optional) - specify the blockNumber for snapshot query (default latest). BlockVision can not only support users to query the current position, but also support users to query the historical information at any time.

Returns

Object - An object with the following fields:
Response Payload:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object, defined below) - an object with the following fields:
    • activeAddress(integer number) - active address amount.
    • totalTransfer(integer number) - total transfer amount.
    • totalApprovalForAll(integer number) - total approvalForAll amount
    • onedayTransfer(integer number) - one day transfer amount
    • ondedayApprovalForAll(integer number) - one day approvalForAll amount

Example

Request

curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_contractStats",
"params": {
"blockNumber": 0,
"contractAddress": "0xA7206d878c5c3871826DfdB42191c49B1D11F466"
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"activeAddress": 13716,
"onedayTransfer": 36,
"onedayApprovalForAll": 5
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result