POSTgetTokenSupply

Returns the total supply of an SPL Token type.

Request Body
jsonrpcstringrequired
idintegerrequired
methodstringrequired
paramsoneOf[]required

It contains following items:

  1. Pubkey of the token Mint (required)
  2. ConfigurationObject (optional)
params[0]string

Pubkey of the token Mint to query, as base-58 encoded string

Responses
idinteger

The request ID

jsonrpcstring

The JSON-RPC version

contextobject

An object containing metadata about the current state of the Solana network at the time of the request.

apiVersionstring

The API version used for the request

slotinteger

The slot number at which the request was evaluated

valueobject
amountstring

The raw amount without decimals, a string representation of u64

decimalsnumber

Number of base 10 digits to the right of the decimal place

uiAmountnumber

The total token supply, using mint-prescribed decimals

uiAmountStringstring

The total token supply as a string, using mint-prescribed decimals

X-API-KEY
RequestCU20
cURL
curl -X POST "https://solana-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenSupply",
  "params": [
    "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",
    {
      "commitment": "finalized"
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": {
      "amount": "100000",
      "decimals": 2,
      "uiAmount": 1000,
      "uiAmountString": "1000"
    }
  },
  "id": 1
}