Links

nft_accountPositions

Get historical position information for any account address without scanning the entire chain.
Using this API, you can query all the collections that the account are holding by specifying the account address. BlockVision will help you filter out some collections. For instance, BlockVision could filter out contracts that do not implement token_uri method or those whose URI for hosting metadata have expired. By this API, you could easily see who possess certain NFT collection. Some user cases could use this API like event entry qualification proof, marketing strategy making, looking for friends who have the same taste as you, etc.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields (required):
  • accountAddress(hex string, required) - account address.
  • blockNumber(integer number, optional) - 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 position at any time.
  • 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(array of object, defined below) - response data.
  • Object schema:
    • contractAddress(hex string) - contract address.

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_accountPositions",
"params": {
"accountAddress": "0xA0032F20c5806D2e6cD0De2170839EC1EFA65c7a",
"blockNumber": 0,
"pageSize": 20,
"pageIndex": 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.getNFTAccountPositions({
accountAddress: '0xA0032F20c5806D2e6cD0De2170839EC1EFA65c7a',
blockNumber: 0
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"contractAddress": "0x31aE5109E5ADB582F4F42cA9AAA9a723a325f214"
},
{
"contractAddress": "0x06Fd60173bF869B8CE4439E3477223C013baD466"
},
{
"contractAddress": "0x495f947276749Ce646f68AC8c248420045cb7b5e"
},
{
"contractAddress": "0x2A9A5D31254980D18Cab48186027b6bcCeA96b6e"
},
{
"contractAddress": "0x69cE31865f001E60fe3F1CA82333435843aEA19A"
},
{
"contractAddress": "0xf619E90052965e4c366c0C62af0f90216F35A5d8"
},
{
"contractAddress": "0x15533781a650F0c34F587CdB60965cdFd16ff624"
},
{
"contractAddress": "0x71B11Ac923C967CD5998F23F6dae0d779A6ac8Af"
},
{
"contractAddress": "0x241530F1A6e8D7ceFba9dC29afbAEF7437f9Ac5e"
},
{
"contractAddress": "0x398A5b355658Df4a836c9250FCe6F0A0fC0c9EA0"
},
{
"contractAddress": "0x4A453Df93535F6BaA8dc3cb1B0c032289dA3Bd16"
},
{
"contractAddress": "0xf3E6DbBE461C6fa492CeA7Cb1f5C5eA660EB1B47"
},
{
"contractAddress": "0xa7eE407497b2Aeb43580cabe2B04026b5419D1dc"
},
{
"contractAddress": "0xDa7D42B6167f1497346D7B2336a6D7A603026Db1"
},
{
"contractAddress": "0x343f999eAACdFa1f201fb8e43ebb35c99D9aE0c1"
},
{
"contractAddress": "0x18c7766A10df15Df8c971f6e8c1D2bbA7c7A410b"
},
{
"contractAddress": "0xB5C747561a185A146f83cFff25BdfD2455b31fF4"
},
{
"contractAddress": "0x3e511FE60D5FE09503C5F2a6477a75d0b905b335"
},
{
"contractAddress": "0x1d81A6c7Ddc15b1553D49987c0286FaAe6734877"
},
{
"contractAddress": "0xc49CD62d0a38bB06B72087e2Ba889AE36ef1c873"
},
{
"contractAddress": "0x91F7bB6900d65D004A659F34205beAfC3B4e136C"
}
]
}