Get NFT History by Address
Overview
The Get NFT History by Address endpoint obtains data on all NFTs previously owned by an EOA wallet,
whose address
is a required path parameter. Results are sorted in descending order, so the most recently
transferred NFT that the address
had owned will appear at the top. To refine your search, you can add a
contract
address as a query parameter. Additionally, metadata
and sale_price
can be included by
setting their field values to true
.
A successful request to the endpoint returns a JSON response with data on previously owned NFTs,
labeled as items. These items include their id
, token_id
, collection
and transfer
data,
along with metadata
and sale_price
if you opt to include them in your response. The transfer
data features the following fields: block_number
, block_timestamp
, tx_hash
, from_address
,
to_address
, and origin
.
Usage
In this example, we receive data on all NFTs previously owned by the EOA wallet's address
0xb6042f438D63181E7E220A72e9fff845062EB48d
.
import * as Parsiq from '@parsiq/parsiq.js';
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
const address = client.nft.getAddressHistory('0xb6042f438D63181E7E220A72e9fff845062EB48d', {});
for await (const history of address) {
console.log(history);
}
Output:
{
id: '0000000000e27dd7-013b-0000000a',
token_id: '5550',
collection: {
address: '0x36d7b711390d34e8fe26ad8f2bb14e7c8f0c56e9',
total_supply: '5555',
symbol: 'ODYC',
name: 'Okay Duck Yacht Club',
standard: 'ERC721'
},
transfer: {
from: '0xbea2bde77dded2336fa2a86bcf0e2a5b167ec67e',
to: '0xb6042f438d63181e7e220a72e9fff845062eb48d',
origin: '0xb6042f438d63181e7e220a72e9fff845062eb48d',
block_number: 14843351,
block_timestamp: 1653502217,
tx_hash: '0xd6dfddfe14d89ef11756969dd76718fa90cf4faf98c0ceb1acca5c60fec469e0'
},
metadata: null,
sale_price: null
}
Parameters
chainId
version
address
contract
metadata
sale_price
offset
limit
estimate_cu