Tracking NFT movement in Solana: How to view transfer history for a specific wallet?

I’m trying to find a way to track NFT transfers for a particular wallet on Solana. I want to see both incoming and outgoing NFT transactions. Does anyone know of a good API for this?

I tried using the getSignaturesForAddress function from the @solana/web3.js library, but it doesn’t seem to keep a record of NFT transfers. I’m looking for something similar to what you can see in the token history section of Solana Explorer.

Here’s a quick example of what I’ve tried:

import { Connection, PublicKey } from '@solana/web3.js';

const connection = new Connection('https://api.mainnet-beta.solana.com');
const walletAddress = new PublicKey('MyWalletAddressHere');

async function getNFTTransfers() {
  const signatures = await connection.getSignaturesForAddress(walletAddress);
  console.log(signatures);
  // But this doesn't show NFT transfers specifically
}

getNFTTransfers();

Any ideas on how to get this working? Or is there a better approach I should be using?

yo Luna_Dreamy, have u checked out the solscan api? it’s pretty sweet for nft tracking. they got this endpoint /account/token/txs that shows all token transfers, including nfts. u just need to pass the wallet address and it’ll give u a nice json with all the deets. might be worth a shot if the other stuff ain’t working for ya!

The Helius API is a strong alternative for tracking NFT transfers on Solana. I have experimented with it and found its endpoints provide more detailed NFT-specific data than what you get with the standard web3.js methods. You can obtain an API key from Helius and use their getAssetTransfers endpoint to retrieve both incoming and outgoing NFT transactions. In my experience, this method yields a more comprehensive history while also handling complexities like pagination and rate limits effectively.

hey there, Luna_Dreamy! i’ve been wondering about nft tracking too :thinking: have you looked into using the solana program library (spl)? it’s got some cool stuff for token transfers that might work for nfts.

what about trying something like the getTokenAccountsByOwner method? it could give you a list of all the token accounts owned by a wallet, including nfts. then you could maybe use getParsedTokenAccountsByOwner to get more details?

just brainstorming here, but maybe something like:

const tokenAccounts = await connection.getTokenAccountsByOwner(walletAddress, { programId: TOKEN_PROGRAM_ID });

then you could loop through those accounts and check for nft-like properties? idk, just a thought!

what kind of nfts are you trying to track, btw? anything cool? :blush: