getEpochInfo
Returns information about the current epoch

Parameters

  • <object> - (optional) Config object:
    • commitment: <object> - (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.

Results

  • amount: <u64 string> - the raw balance without decimals
  • decimals: <u8> - number of base 10 digits to the right of the decimal place
  • uiAmountString: <string> - the balance as a string, using mint-prescribed decimals

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc": "2.0",
5
"id": 1,
6
"method": "getTokenSupply",
7
"params": [
8
"3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E"
9
]
10
}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"context": {
5
"slot": 1114
6
},
7
"value": {
8
"amount": "100000",
9
"decimals": 2,
10
"uiAmount": 1000,
11
"uiAmountString": "1000"
12
}
13
},
14
"id": 1
15
}
Copied!