Get NFT by Address
Overview
The Get NFT by Address endpoint obtains data on all NFTs currently owned by an EOA wallet, whose address
is a required path parameter. Results are sorted in descending order, so the most recently acquired NFT 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 the 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: sender
, block_number
, block_timestamp
, and tx_hash
.
Usage
In this example, we receive data on all NFTs currently 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 nfts = client.nft.getByAddress(`0xb6042f438D63181E7E220A72e9fff845062EB48d`, {});
for await (const nft of nfts) {
console.log(nft);
}
Output:
{
id: '0000000000efd251-00d6-00000006',
token_id: '432',
collection: {
address: '0xe5e771bc685c5a89710131919c616c361ff001c6',
total_supply: '8750',
symbol: 'WZNFT',
name: 'WizNFT',
standard: 'ERC721'
},
transfer: {
sender: '0x54e09b5ac394d84c908cbdb8a5b949ede6779d97',
block_number: 15716945,
block_timestamp: 1665395771,
tx_hash: '0x1d65be0152becc8f7a1d18dc0614b7e019ecb077f5be1dfdf1043d316c54dbfb'
},
metadata: null,
sale_price: null
}
Parameters
chainId
version
address
contract
metadata
sale_price
offset
limit
estimate_cu