Skip to main content

Parameters

string
required
Public key of the token mint (base-58 encoded)
object
Configuration object containing:
string
Commitment level (processed, confirmed, finalized)

Response

object
Object containing:
object
number
The slot the request was processed at
object
string
Raw amount of tokens as a string
number
Number of decimals configured for token’s mint
number
Token amount as a float, accounting for decimals
string
Token amount as a string, accounting for decimals

Code Examples

Basic Request

Using web3.js

Notes

  1. Returns the total supply of a token mint
  2. The supply includes all tokens in circulation
  3. The response is immediate as it reads from the current state
  4. The supply can change with token minting and burning
  5. The mint must be a valid token mint

Best Practices

  1. Use appropriate commitment level based on your needs
  2. Cache results when appropriate to reduce RPC load
  3. Monitor for changes in token supply
  4. Consider using websocket subscription for real-time updates
  5. Handle network errors and retry when appropriate

Common Errors

Use Cases

  1. Token Supply Analysis
  2. Token Supply Monitoring
  3. Token Supply Planning