Fungible Token Extension
The most versatile API for working with tokens on Solana.
Last updated
Was this helpful?
The most versatile API for working with tokens on Solana.
Last updated
Was this helpful?
Initially, the DAS API only supported ownership queries against Metaplex NFTs and cNFTs. Helius has extended the DAS API to support all tokens, including plain SPL tokens (without metadata) and Token22 (plus their extensions).
Users can query for the token balances of any account, across all tokens (SPL, Token22, NFTs, compressed NFTs). We've also included token prices in USD.
A Solana token is defined by its mint account. For example, the mint account for USDC is . When you buy $40 of USDC, a token account is created that holds 40 USDC tokens. This can extend to hundreds (and even more) of token accounts for different tokens.
The Helius extension for fungible tokens resolves around ownership indexing. The following queries provide a unified view of an account's assets. , , and support fungible tokens.
This extension adds an extra field called tokenType
. This field allows you to query against all assets the account owns, including fungible and Token22 tokens.
The options for tokenType
include:
fungible
: Returns all fungible tokens.
nonFungible
: Returns all NFTs (compressed and regular NFTs).
regularNFT
: Returns only the regular NFTs.
compressedNFT
: Returns only the compressed NFTs.
all
: Returns all the tokens.
Example:
You'll now see fungible tokens like JitoSOL in the response (trimmed for brevity). It will include the total account balance, the token's program address, the associated token address, the total supply in circulation, and the price information.
We support Token22 tokens and parse their extensions. The response will include the mint_extensions
field if it is a Token22 program. Here is an example for BERN:
For backwards compatibility, the behaviour is identical to the original DAS, meaning only NFTs and compressed NFTs are returned.