Overview
What is the Metrics API?
The Metrics API equips web3 developers with a robust suite of tools to access and analyze on-chain activity across Avalanche’s primary network, Avalanche L1s, and other supported EVM chains. This API delivers comprehensive metrics and analytics, enabling you to seamlessly integrate historical data on transactions, gas consumption, throughput, staking, and more into your applications.
The Metrics API, along with the Data API are the driving force behind every graph you see on the Avalanche Explorer. From transaction trends to staking insights, the visualizations and data presented are all powered by these APIs, offering real-time and historical insights that are essential for building sophisticated, data-driven blockchain products..
Features
- Chain Throughput: Retrieve detailed metrics on gas consumption, Transactions Per Second (TPS), and gas prices, including rolling windows of data for granular analysis.
- Cumulative Metrics: Access cumulative data on addresses, contracts, deployers, and transaction counts, providing insights into network growth over time.
- Staking Information: Obtain staking-related data, including the number of validators and delegators, along with their respective weights, across different subnets.
- Blockchains and Subnets: Get information about supported blockchains, including EVM Chain IDs, blockchain IDs, and subnet associations, facilitating multi-chain analytics.
- Composite Queries: Perform advanced queries by combining different metric types and conditions, enabling detailed and customizable data retrieval.
The Metrics API is designed to provide developers with powerful tools to analyze and monitor on-chain activity across Avalanche’s primary network, Avalanche L1s, and other supported EVM chains. Below is an overview of the key features available:
Chain Throughput Metrics
-
Gas Consumption
Track the average and maximum gas consumption per second, helping to understand network performance and efficiency. -
Transactions Per Second (TPS)
Monitor the average and peak TPS to assess the network’s capacity and utilization. -
Gas Prices
Analyze average and maximum gas prices over time to optimize transaction costs and predict fee trends. Monitor the average and peak TPS to assess the network’s capacity and utilization.
Cumulative Metrics
- Address Growth
Access the cumulative number of active addresses on a chain, providing insights into network adoption and user activity. - Contract Deployment
Monitor the cumulative number of smart contracts deployed, helping to gauge developer engagement and platform usage. - Transaction Count
Track the cumulative number of transactions, offering a clear view of network activity and transaction volume.
Staking Information
- Validator and Delegator Counts
Retrieve the number of active validators and delegators for a given L1, crucial for understanding network security and decentralization. - Staking Weights
Access the total stake weight of validators and delegators, helping to assess the distribution of staked assets across the network.
Rolling Window Analytics
- Short-Term and Long-Term Metrics: Perform rolling window analysis on various metrics like gas used, TPS, and gas prices, allowing for both short-term and long-term trend analysis.
- Customizable Time Frames: Choose from different time intervals (hourly, daily, monthly) to suit your specific analytical needs.
Blockchain and L1 Information
- Chain and L1 Mapping: Get detailed information about EVM chains and their associated L1s, including chain IDs, blockchain IDs, and subnet IDs, facilitating cross-chain analytics.
Advanced Composite Queries
- Custom Metrics Combinations: Combine multiple metrics and apply logical operators to perform sophisticated queries, enabling deep insights and tailored analytics.
- Paginated Results: Handle large datasets efficiently with paginated responses, ensuring seamless data retrieval in your applications.
The Metrics API equips developers with the tools needed to build robust analytics, monitoring, and reporting solutions, leveraging the full power of multi-chain data across the Avalanche ecosystem and beyond.
Was this page helpful?