Get NFT/FT balance

Returns NFT balances for a specific wallet

🔭 Guide overview

In this guide, you will fetch all the owned NFTs and FTs of a wallet. You will need to create a client ↗️, set up your wallet and at login with one user ↗️ and send at least one NFT to a wallet ↗️ to proceed. Please do these steps unless already done.

🏷️ Use-case examples with the Croak Balance APIs

  • Get all NFTs and FTs currently owned by a given wallet
  • Get the metadata associated with a given NFT and FT

🧱 Implementation steps

  1. Wallet Id : Get the walletId for which you want to make the query
  2. Fetch data request : Get the NFTs and FTs owned using the following API. See API Reference for code snippets in more languages ↗️
> curl --request GET \
     --url 'https://be.namasteapis.com/blockchain/v1/wallet-balance/list-wallet-nft-server?walletId=627cb7ea2cd263018f2adfb7&size=50' \
     --header 'Accept: application/json' \
     --header 'x-api-key: Your API Key'

{
  "data": {
    "nfts": [
      {
        "token": {
          "id": "62de5075908167125627763f",
          "creatorId": "62de50119081671256277626",
          "type": "ERC1155_LAZY",
          "name": "SomeName",
          ...
          "tokenId": "99114679086191728320366730639322510063936417164752678688100933618617724390488"
        },
        "quantity": "1"
      }
    ],
    "contracts": [
      {
        "confirmed": true,
        "id": "62de504e9081671256277637",
        "name": "Test",
        ...
        "type": "OpenGlipERC1155",
        "contractAddress": "0x6608F7D00C3334Dc7FeF8515c00dEc23C3F02551"
      }
    ]
    "lastId": "62de5075908167125627763f"
  },
  "success": true,
  "message": "Users nft data"
}

You can try it yourself 😎 here!

  1. That's it you're done 🏁

📌 Further queries

For any queries or guidance, join https://croak.discord.com or write to [email protected]