Quantum
  • Welcome to Quantum
  • Developer portal
    • Pricing
  • Self-Custody Infrastructure
    • Pincode Management
    • Private Key Management
  • Quickstart guide
  • Authentication
    • API Authentication
  • Faucets
  • Networks & URLs
  • Walletify Api
    • Overview
    • Getting started
    • User Management
    • Signing Methods
    • Testnet Assets
    • Basic Guides
      • Create a user
      • Retrieve a user
      • Update a user
      • Delete a user
      • Create a signing method
      • Update a signing method
      • Delete a signing method
      • Create a wallet
      • Retrieve wallet
      • Archive a wallet
      • Import a wallet
      • Export a wallet
      • Retrieve native balance
      • Retrieve ERC20 tokens
      • Retrieve NFTs
      • Transfer a native token
      • Transfer an ERC20 token
      • Transfer an NFT
      • Transfer a fungible token
      • Signatures
      • Read a contract
      • Execute a contract call
      • Get Transaction status
      • Resubmit a transaction
      • Get wallet events
      • Webhooks
    • Advanced Guides
      • Burn an NFT
      • Filter Spam NFTs
      • Filter NSFW NFTs
      • SWAP Token Pairs
      • Gasless/Meta Transactions
      • Sign RAW Transactions
      • Using Fiat Onramp with Walletify-API
      • Deploy an Ethereum contract
      • Integrate with WalletConnect
      • Set Up NFT Token Gating
      • Chain Specific Fields
      • Integrate with WalletConnect
      • Encrypted PIN Transfer
  • Nft Wizard Api
    • Overview
    • Getting started
    • Basic Guides
      • Get any NFT info
      • Get any NFT contract
      • Get NFTs by any wallet
      • Get wallets by any NFT
      • Create contract
      • Retrieve Contract
      • Delete Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-type (NFT template)
      • Retrieve Token-type (NFT template)
      • Delete Token-type (NFT Template)
      • Check Token-type Status
      • Retrieve Token-type Metadata
      • Update Token-type Metadata
      • Mint an NFT
      • Batch Mint NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to your NFTs
      • Add Video to your NFTs
      • Store NFT Media
      • Webhooks
    • Advanced Guides
      • Mass Minting
      • Speed Up Minting
      • Dynamic NFTs
      • Configure Royalties
      • Create Company Minter Wallet
      • Retrieve Company Minter Wallets
      • Store NFT Metadata on IPFS
      • View NFT on sandbox/testnet
    • NFT Configuration
      • Attributes
      • Animation & Media
      • Collection Info
      • Max Supply
      • Mint Number
      • Burnable
      • Metadata Storage
  • TMINTER API
    • Overview
    • Getting started
    • Basic Guide
      • Retrieve Any NFT Information
      • Retrieve NFT Contract Information
      • Retrieve NFTs by Wallet Address
      • Retrieve Wallets by NFT
      • Create a New NFT Contract
      • Retrieve a Contract
      • Delete a Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-Type
      • Retrieve Token-Type
      • Delete Token-Type
      • Check Token-Type Status
      • Retrieve Token-Type Metadata
      • Update Token-Type Metadata
      • Mint a Single NFT
      • Batch Mint Multiple NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to Your NFTs
      • Add Video to Your NFTs
      • Store NFT Media
      • Webhooks for NFT Events
    • Advance Guide
      • Dynamic NFT Creation
      • Token Economics and Supply Control
      • Advanced Minting: Royalty Distribution
      • Cross-Chain NFT Minting
      • NFT Sharding (Fractional Ownership)
      • Batch NFT Minting with Custom Metadata
      • Add Interactivity to NFTs
      • Advanced Media Integration: VR and AR
      • Webhook Triggers for Automated Processes
Powered by GitBook
On this page
  • 1. Get all token balances by wallet id
  • 2. Get all token balances by blockchain and wallet address
  • 3. Get a specific token balance by wallet id and token address
  • 4. Get a specific token balance by blockchain, wallet address, and token address
  1. Walletify Api
  2. Basic Guides

Retrieve ERC20 tokens

How to retrieve the token balances for a wallet (ERC20 standard).

PreviousRetrieve native balanceNextRetrieve NFTs

Last updated 10 months ago

Retrieve ERC20 token balances by:

  1. Wallet id

  2. Blockchain and wallet address

  3. Wallet id and token address

  4. Blockchain, wallet address, and token address

📘

Optionally, you can filter the results using the includePossibleSpam boolean param in the query.

1. Get all token balances by wallet id

Request Endpoint:

HTTP

GET /api/wallets/{walletId}/balance/tokens
Parameter
Param Type
Description
Data Type
Mandatory

{walletId}

Path

The ID of the wallet

String

✅

includePossibleSpam

Query

Indication to include possible spam tokens in the response body or not.

Boolean

❌

Request Example

HTTP

GET /api/wallets/f21dc1e5-4253-487e-8927-3b5247437f99/balance/tokens

Response Body

JSON

{
    "success": true,
    "result": [
        {
            "tokenAddress": "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",
            "rawBalance": "32876284951737501699",
            "balance": 32.8762849517375,
            "decimals": 18,
            "symbol": "UNI",
            "logo": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "type": "ERC20",
            "transferable": true,
            "name": "Uniswap",
            "exchange": {
                "usdPrice": 8.056647793652566,
                "usdBalanceValue": 264.872648619909
            },
            "categories": [
                "Automated Market Maker (AMM)",
                "Decentralized Exchange (DEX)",
                "Decentralized Finance (DeFi)"
            ],
            "links": {
                "twitter": "https://twitter.com/Uniswap",
                "website": "https://uniswap.org/",
                "reddit": "https://www.reddit.com/r/Uniswap",
                "discord": "https://discord.gg/FCfyBSbCU5"
            },
            "thumbnail": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "portfolioPercentage": "100"
        }
    ]
}

2. Get all token balances by blockchain and wallet address

HTTP

GET /api/wallets/{secretType}/{walletAddress}/balance/tokens
Parameter
Param Type
Description
Data Type
Mandatory

{secretType}

Path

Indication on which chain the balance should be fetched

String

✅

{walletAddress}

Path

The address of the wallet

String

✅

includePossibleSpam

Query

Indication to include possible spam tokens in the response body or not.

Boolean

❌

Request Example

HTTP

GET /api/wallets/ARBITRUM/0x9f0847430a41ff52573857b49A87076e1748ed6A/balance/tokens

Response Body

JSON

{
    "success": true,
    "result": [
        {
            "tokenAddress": "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",
            "rawBalance": "32876284951737501699",
            "balance": 32.8762849517375,
            "decimals": 18,
            "symbol": "UNI",
            "logo": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "type": "ERC20",
            "transferable": true,
            "name": "Uniswap",
            "exchange": {
                "usdPrice": 8.056647793652566,
                "usdBalanceValue": 264.872648619909
            },
            "categories": [
                "Automated Market Maker (AMM)",
                "Decentralized Exchange (DEX)",
                "Decentralized Finance (DeFi)"
            ],
            "links": {
                "twitter": "https://twitter.com/Uniswap",
                "website": "https://uniswap.org/",
                "reddit": "https://www.reddit.com/r/Uniswap",
                "discord": "https://discord.gg/FCfyBSbCU5"
            },
            "thumbnail": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "portfolioPercentage": "100"
        }
    ]
}

3. Get a specific token balance by wallet id and token address

HTTP

GET /api/wallets/{walletId}/balance/tokens/{token}
Parameter
Param Type
Description
Data Type
Mandatory

{walletId}

Path

The ID of the wallet

String

✅

{token}

Path

Address of the token (contract) to fetch the balance for

String

✅

includePossibleSpam

Query

Indication to include possible spam tokens in the response body or not.

Boolean

❌

Request Example

HTTP

GET /api/wallets/f21dc1e5-4253-487e-8927-3b5247437f99/balance/tokens/0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0

Response Body

JSON

{
    "success": true,
    "result": [
        {
            "tokenAddress": "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",
            "rawBalance": "32876284951737501699",
            "balance": 32.8762849517375,
            "decimals": 18,
            "symbol": "UNI",
            "logo": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "type": "ERC20",
            "transferable": true,
            "name": "Uniswap",
            "exchange": {
                "usdPrice": 8.056647793652566,
                "usdBalanceValue": 264.872648619909
            },
            "categories": [
                "Automated Market Maker (AMM)",
                "Decentralized Exchange (DEX)",
                "Decentralized Finance (DeFi)"
            ],
            "links": {
                "twitter": "https://twitter.com/Uniswap",
                "website": "https://uniswap.org/",
                "reddit": "https://www.reddit.com/r/Uniswap",
                "discord": "https://discord.gg/FCfyBSbCU5"
            },
            "thumbnail": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "portfolioPercentage": "100"
        }
    ]
}

4. Get a specific token balance by blockchain, wallet address, and token address

HTTP

GET /api/wallets/{secretType}/{walletAddress}/balance/tokens/{token}
Parameter
Param Type
Description
Data Type
Mandatory

{secretType}

Path

Indication on which chain the balance should be fetched

String

✅

{walletAddress}

Path

The address of the wallet

String

✅

{token}

Path

Address of the token (contract) to fetch the balance for

String

✅

includePossibleSpam

Query

Indication to include possible spam tokens in the response body or not.

Boolean

❌

Request Example

HTTP

GET /api/wallets/ARBITRUM/0x9f0847430a41ff52573857b49A87076e1748ed6A/balance/tokens/0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0

Response Body

JSON

{
    "success": true,
    "result": [
        {
            "tokenAddress": "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",
            "rawBalance": "32876284951737501699",
            "balance": 32.8762849517375,
            "decimals": 18,
            "symbol": "UNI",
            "logo": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "type": "ERC20",
            "transferable": true,
            "name": "Uniswap",
            "exchange": {
                "usdPrice": 8.056647793652566,
                "usdBalanceValue": 264.872648619909
            },
            "categories": [
                "Automated Market Maker (AMM)",
                "Decentralized Exchange (DEX)",
                "Decentralized Finance (DeFi)"
            ],
            "links": {
                "twitter": "https://twitter.com/Uniswap",
                "website": "https://uniswap.org/",
                "reddit": "https://www.reddit.com/r/Uniswap",
                "discord": "https://discord.gg/FCfyBSbCU5"
            },
            "thumbnail": "https://logo.moralis.io/0xa4b1_0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0_53b65838dbb44ea0bf1ef10445f4da21",
            "portfolioPercentage": "100"
        }
    ]
}

Request Endpoint:

Request Endpoint:

Request Endpoint:

reference
reference
reference
reference