ankr_getBlockchainStats
Get per-chain stats: latest block, totals, native coin USD price
POST/?ankr_getBlockchainStats
Returns headline statistics for one or more chains: latest block number, average block time, total transactions and events since genesis, and the current native coin USD price.
Pass a blockchain array to scope the query; omit or pass an empty array for all supported chains. Useful for hero banners, homepage tiles, and basic network health checks.
Part of the Query API product (700 compute units per call, $0.00007 at base rate).
Plan availability. This method is restricted on the shared demo key (
-32075 Method disabled, reason: restricted by blockchain schema). Use your own API key to call it.
Request
Responses
- 200
- 400
- 401
- 429
- 500
Success. JSON-RPC result contains the stats array. JSON-RPC errors are returned with HTTP 200; check the response body for an error key.
Bad Request — malformed JSON-RPC envelope or invalid params. The gateway rejects before the JSON-RPC layer processes the call.
Unauthorized — missing or invalid API key in the server URL path. Verify that {API_KEY} is set to a valid project key.
Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.
Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/.