Links

nft_listings

Get NFT listings from a marketplace.
Through nft_listings, you can fetch the listing information including the listing price, latest owner, listing marketplace, etc., contractAddress and tokenId are necessary. Using this API, both of asset info and order info could be acknowledged. Some marketing investigation and strategies could be made by calling this API.
Supported on Ethereum.

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.
  • tokenId(string, required) - id of the NFT.
  • pageSize(integer number, optional, default 20 max 50) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page index.
    • total(integer number) - total listed records.
    • data(array of object, defined below) - response data.
  • Object schema:
    • asset(object) - an object with the following fields:
      • tokenId(string) - id of the NFT.
      • collectionAddress(hex string) - the contract address of the collection.
      • tokenURI(string) - the URI of the NFT.
      • owner(hex string) - owner address of the NFT.
    • order(object) - an object with following fields:
      • hash(hex string) - the hash key of the order.
      • marketPlace(string) - looksRare, openSea and etc...
      • collectionAddress(hex string) - the contract address of the collection.
      • tokenId(string) - id of the NFT.
      • amount(integer number) - the amount of NFT in this order.
      • currencyAddress(hex string) - the address of the currency.
      • price(string) - the cost of this order.
      • startTime(integer number) - listing start time.
      • endTime(integer number) - listing end time.
      • marker(hex string) - the maker of the the order.
      • listTime(integer number) - the order's listing time.

Example

Request

curl
TypeScript
curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_listings",
"params": {
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "8830",
"pageIndex": 1,
"pageSize": 1
}
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.ETH_MAINNET)
// Access the BlockVision NFT API
bv.getNFTListings({
contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
tokenId: '8830'
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"asset": {
"tokenId": "8830",
"collectionAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenURI": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/8830",
"owner": "0x10a2DFb788a57587E6deAd219fb2829B8eAd9D7b"
},
"order": {
"hash": "0x4e0794422debc9e5594004f42eb94372569f51261aff0f2ff7d5ec7e3e7b407b",
"marketPlace": "looksRare",
"collectionAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "8830",
"amount": 1,
"currencyAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"price": "121147346000000000000",
"startTime": 1655385964,
"endTime": 1655472350,
"marker": "0x10a2DFb788a57587E6deAd219fb2829B8eAd9D7b",
"listTime": 1655385968
}
}
],
"nextPageIndex": 2,
"total": 37
}
}