platform.getCurrentSupply - AVAX

Example code for the platform.getCurrentSupply JSON-RPC method. Complete guide on how to use platform.getCurrentSupply JSON-RPC in GetBlock Web3 documentation.

Returns the current AVAX supply on the P-Chain, in nAVAX. Useful for tokenomics dashboards and on-chain analytics.

Parameters

Parameter
Type
Required
Description

subnetID

string

No

Subnet ID (default: Primary Network)

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/P' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "platform.getCurrentSupply",
    "params": {},
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "result": {
        "supply": "471610318699269213",
        "height": "25002519"
    },
    "id": "getblock.io"
}

Response Parameters

Field
Type
Description

result.supply

string

Current AVAX supply in nAVAX (decimal string)

Use Cases

  • Token supply dashboards

  • Inflation analytics over time

  • Building public-facing AVAX statistics pages

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?