[Solved] Get contract address from token

Hi !

I use Moralis on my nodejs app to get all NFTs from a wallet using getWalletNFTs() and it works fine for that. Now I want to filter those NFTs based on the contract address but everything is present in the response (with the owner even if we used this to get those results) except the contract address.

The name or symbol properties can’t be used as they’re not unique. Is there a way to get the contract address without making additional request to Moralis API?

Thank you.

Hi, there is a parameter to specify the contract address and it will return only the nfts for that wallet from that contract

I must have messed up addresses when I tested, token_address actually represents the token’s contract address as I first though. (But when copy-pasting them on a scan it didn’t took the to the actual contract).

Sorry for the stupid question and thank you for your help!

1 Like