Skip to main content
Returns the total supply of tokens for a given SPL token mint address.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenSupply",
  "params": ["Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"]
}

Parameters

mint
string
required
Base-58 encoded public key of the token mint to query.
commitment
string
Commitment level for the query. One of processed, confirmed, or finalized.

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": { "slot": 1114 },
    "value": {
      "amount": "100000",
      "decimals": 2,
      "uiAmount": 1000.0,
      "uiAmountString": "1000"
    }
  }
}
value.amount
string
Total supply as a string, without decimal adjustment.
value.decimals
number
Number of decimal places for this token.
value.uiAmount
number | null
Total supply as a float, adjusted for decimals. May be null if the value overflows a float.
value.uiAmountString
string
Total supply as a string, adjusted for decimals.

Example

curl "https://rpc.solami.fast/sol?api_key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTokenSupply",
    "params": ["Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"]
  }'