Fungible Token Extension (Beta)
The most versatile API for working with tokens on Solana.
Background
Originally, 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).
As a bonus, we've even included token prices in USD.
A Solana token is defined by it's mint account. For example, the mint account for USDC is EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. 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.
Want to learn more about Token22? Check out the Helius blog post!
How does it work?
The Helius extension for fungible tokens resolves around ownership indexing. The following queries provide a unified view of the assets owned an account.
Backwards Compatibility
For backwards compatibility, the behaviour is identical to the original DAS β meaning only NFTs and compressed NFTs are returned.
Fungible Support
The Helius extension adds an extra field called tokenType
. This field allows you to query against all assets owned by the account, including fungible and Token22 tokens.
In the response you'll now see fungible tokens like JitoSOL (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.
Token22 Support
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:
TokenType Options
The current options are fungible
, nonFungible
, regularNft
, compressedNft
, and all
.
How to Get Started?
Just use the DAS API as you would before but also keep in mind that GetAsset, GetAssetsByOwner, and SearchAssets now also support fungible tokens!
Last updated