Fungible Assets

Overview

The DAS API indexes all mints and token accounts for the Solana Token Program and Token Extensions Program. It allows querying token balances, metadata, and associated program details.

Supported Queries

  • GetAsset: Fetch details of a specific token mint.

  • GetAssetsByOwner: Retrieve all tokens (fungible and non-fungible) held by an account.

  • SearchAssets: Search for assets using filters, including token type.

Querying Token Balances

DAS API supports querying token balances across:

  • SPL Tokens

  • Token22 Tokens

  • NFTs (regular and compressed NFTs)

Example Request

{
    "jsonrpc": "2.0",
    "id": "string",
    "method": "searchAssets",
    "params": {
        "ownerAddress": "5aZZ4duJUKiMsJN9vRsoAn4SDX7agvKu7Q3QdFWRfWze",
        "tokenType": "All"
    }
}

Example Response

{
    "id": "TokenMintAddress",
    "content": {
        "metadata": {
            "name": "Jito Staked SOL",
            "symbol": "JitoSOL",
            "token_standard": "Fungible"
        },
        "token_info": {
            "symbol": "EXT",
            "balance": 1000000000,
            "supply": 500000000000,
            "decimals": 9,
            "token_program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
            "associated_token_address": "H7iLu4DPFpzEx1AGN8BCN7Qg966YFndt781p6ukhgki9"
        }
    }
}

The DAS API supports Token22 tokens and their extensions. The response includes the mint_extensions field when applicable.

Example Token22 Response

{
    "mint_extensions": {
        "transfer_fee_config": {
            "withheld_amount": 0,
            "newer_transfer_fee": {
                "epoch": 500,
                "maximum_fee": 1000000000,
                "transfer_fee_basis_points": 500
            },
            "withdraw_withheld_authority": "AuthorityPublicKey",
            "transfer_fee_config_authority": "AuthorityPublicKey"
        }
    }
}

Conclusion

The DAS API allows querying of fungible tokens, SPL and Token22, including metadata, balances, and associated program details.

Last updated

Was this helpful?