Skip to main content

Analytics API

The Analytics API provides blockchain data analysis, time series metrics, and market insights across supported chains.

Endpoints Overview

EndpointDescription
GET /v1/analytics/overviewHigh-level platform overview
GET /v1/analytics/timeseriesTime series data for any metric
GET /v1/analytics/{chain}/dataChain-specific analytics
GET /v1/analytics/compareCompare metrics across chains
GET /v1/analytics/metrics/availableList available metrics
GET /v1/analytics/trending/tokensTrending tokens
GET /v1/analytics/defi/metricsDeFi protocol metrics
GET /v1/analytics/market/overviewMarket overview

Platform Overview

GET /v1/analytics/overview

Returns high-level platform statistics.

Response

{
"total_transactions": 1500000000,
"total_volume": "5000000000000",
"active_chains": 10,
"active_users": 2000000,
"timestamp": "2026-01-15T10:30:00Z"
}

Time Series Data

GET /v1/analytics/timeseries

Get time series data for any metric.

Query Parameters

ParameterTypeDefaultDescription
chainstringethereumBlockchain chain
metricstringtransaction_volumeMetric type
intervalstring1hTime interval (1m, 5m, 15m, 1h, 1d)
start_datestring-Start timestamp (ISO format)
end_datestring-End timestamp (ISO format)

Response

{
"chain": "ethereum",
"metric": "transaction_volume",
"interval": "1h",
"data_points": [
{"timestamp": "2026-01-15T08:00:00Z", "value": 5250},
{"timestamp": "2026-01-15T09:00:00Z", "value": 5500},
{"timestamp": "2026-01-15T10:00:00Z", "value": 5750}
],
"metadata": {
"start_date": "2026-01-13T10:00:00Z",
"end_date": "2026-01-15T10:00:00Z",
"data_points_count": 48
}
}

Chain Analytics

GET /v1/analytics/{chain}/data

Get detailed analytics for a specific chain.

Query Parameters

ParameterTypeRequiredDescription
metricstringYesMetric to retrieve
aggregationstringNoTime aggregation: hourly, daily, weekly, monthly
start_datestringNoStart timestamp
end_datestringNoEnd timestamp

Supported Metrics by Chain

ChainAvailable Metrics
ethereumtransaction_volume, active_addresses, gas_usage, new_wallets
bitcointransaction_volume, active_addresses, new_wallets
polygontransaction_volume, active_addresses, gas_usage
arbitrumtransaction_volume, active_addresses, gas_usage
optimismtransaction_volume, active_addresses, gas_usage
basetransaction_volume, active_addresses, gas_usage
starknettransaction_volume, active_addresses

Example

curl -H "X-API-Key: YOUR_KEY" \
"https://api.axol.io/api/v1/analytics/ethereum/data?metric=gas_usage&aggregation=daily"

Response

{
"chain": "ethereum",
"metric": "gas_usage",
"aggregation": "daily",
"data": [
{"timestamp": "2026-01-13T00:00:00Z", "value": 5000000},
{"timestamp": "2026-01-14T00:00:00Z", "value": 5100000},
{"timestamp": "2026-01-15T00:00:00Z", "value": 5200000}
]
}

Compare Metrics

GET /v1/analytics/compare

Compare a metric across multiple chains.

Query Parameters

ParameterTypeRequiredDescription
chainsstring[]YesChains to compare
metricstringYesMetric to compare
aggregationstringNoTime aggregation
start_datestringNoStart timestamp
end_datestringNoEnd timestamp

Example

curl -H "X-API-Key: YOUR_KEY" \
"https://api.axol.io/api/v1/analytics/compare?chains=ethereum&chains=polygon&chains=arbitrum&metric=transaction_volume"

Response

{
"metric": "transaction_volume",
"aggregation": "daily",
"comparison": {
"ethereum": [
{"timestamp": "2026-01-15T00:00:00Z", "value": 1050}
],
"polygon": [
{"timestamp": "2026-01-15T00:00:00Z", "value": 1020}
],
"arbitrum": [
{"timestamp": "2026-01-15T00:00:00Z", "value": 1000}
]
}
}

Available Metrics

GET /v1/analytics/metrics/available

List all available metrics with descriptions.

Query Parameters

ParameterTypeDescription
chainstringFilter metrics by chain support

Response

{
"metrics": [
{
"id": "transaction_volume",
"name": "Transaction Volume",
"description": "Total volume of transactions on the blockchain",
"unit": "tokens",
"aggregations": ["hourly", "daily", "weekly", "monthly"]
},
{
"id": "active_addresses",
"name": "Active Addresses",
"description": "Number of unique addresses active on the blockchain",
"unit": "addresses",
"aggregations": ["daily", "weekly", "monthly"]
},
{
"id": "gas_usage",
"name": "Gas Usage",
"description": "Total gas used for transactions",
"unit": "gas",
"aggregations": ["hourly", "daily", "weekly"]
},
{
"id": "new_wallets",
"name": "New Wallets",
"description": "Number of new wallet addresses created",
"unit": "wallets",
"aggregations": ["daily", "weekly", "monthly"]
}
]
}

GET /v1/analytics/trending/tokens

Get trending tokens on a specific chain.

Query Parameters

ParameterTypeDefaultDescription
chainstringethereumBlockchain chain
limitint10Number of tokens

Response

{
"tokens": [
{"symbol": "PEPE", "change_24h": 45.2, "volume": 1234567},
{"symbol": "SHIB", "change_24h": 23.1, "volume": 987654},
{"symbol": "DOGE", "change_24h": 15.8, "volume": 765432}
],
"chain": "ethereum",
"timestamp": "2026-01-15T10:30:00Z"
}

DeFi Metrics

GET /v1/analytics/defi/metrics

Get DeFi protocol metrics.

Response

{
"tvl": 120000000000,
"volume_24h": 5000000000,
"protocols": [
{"name": "Uniswap", "tvl": 7000000000, "dominance": 5.8},
{"name": "Aave", "tvl": 11000000000, "dominance": 9.2},
{"name": "Compound", "tvl": 3000000000, "dominance": 2.5}
],
"timestamp": "2026-01-15T10:30:00Z"
}

Market Overview

GET /v1/analytics/market/overview

Get comprehensive market overview.

Response

{
"total_market_cap": 1200000000000,
"btc_dominance": 48.5,
"eth_dominance": 18.2,
"volume_24h": 65000000000,
"fear_greed_index": 65,
"trending_categories": ["AI", "Gaming", "L2"],
"timestamp": "2026-01-15T10:30:00Z"
}

Chain Metrics

GET /v1/analytics/chains/metrics

Get metrics for all supported chains.

Response

{
"chains": [
{
"name": "ethereum",
"tps": 15,
"block_time": 12,
"active_validators": 500000
},
{
"name": "polygon",
"tps": 7000,
"block_time": 2,
"active_validators": 100
},
{
"name": "arbitrum",
"tps": 40000,
"block_time": 0.25,
"active_validators": 0
}
],
"timestamp": "2026-01-15T10:30:00Z"
}

Liquidity Metrics

GET /v1/analytics/liquidity/metrics

Get liquidity metrics for a protocol.

Query Parameters

ParameterTypeDefaultDescription
protocolstringuniswapProtocol name
chainstringethereumBlockchain chain

Response

{
"total_liquidity": 5000000000,
"pools": [
{"pair": "ETH/USDC", "liquidity": 500000000, "volume_24h": 100000000},
{"pair": "WBTC/ETH", "liquidity": 300000000, "volume_24h": 50000000},
{"pair": "USDC/USDT", "liquidity": 200000000, "volume_24h": 150000000}
],
"protocol": "uniswap",
"chain": "ethereum",
"timestamp": "2026-01-15T10:30:00Z"
}

User Activity

GET /v1/analytics/user/activity

Get activity analytics for a specific address.

Query Parameters

ParameterTypeRequiredDescription
addressstringYesWallet address

Response

{
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb5",
"total_transactions": 342,
"chains_used": ["ethereum", "polygon", "arbitrum"],
"first_transaction": "2021-03-15T10:00:00Z",
"last_transaction": "2026-01-15T10:30:00Z",
"total_volume_usd": 125000,
"gas_spent_usd": 450
}

Protocol Stats

GET /v1/analytics/protocol/{protocol}/stats

Get protocol-specific statistics.

Response

{
"protocol": "uniswap",
"tvl": 7500000000,
"volume_24h": 500000000,
"unique_users": 150000,
"total_transactions": 10000000,
"pools": 500,
"apy_average": 8.5,
"timestamp": "2026-01-15T10:30:00Z"
}

Code Examples

Python - Analytics Client

import requests
from datetime import datetime, timedelta
from typing import Optional

class AnalyticsClient:
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.axol.io/api/v1/analytics"
self.headers = {"X-API-Key": api_key}

def get_overview(self) -> dict:
"""Get platform overview."""
response = requests.get(
f"{self.base_url}/overview",
headers=self.headers
)
return response.json()

def get_timeseries(
self,
chain: str = "ethereum",
metric: str = "transaction_volume",
interval: str = "1h",
days: int = 7
) -> dict:
"""Get time series data."""
end_date = datetime.utcnow()
start_date = end_date - timedelta(days=days)

response = requests.get(
f"{self.base_url}/timeseries",
headers=self.headers,
params={
"chain": chain,
"metric": metric,
"interval": interval,
"start_date": start_date.isoformat(),
"end_date": end_date.isoformat()
}
)
return response.json()

def get_chain_data(
self,
chain: str,
metric: str,
aggregation: str = "daily"
) -> dict:
"""Get chain-specific analytics."""
response = requests.get(
f"{self.base_url}/{chain}/data",
headers=self.headers,
params={
"metric": metric,
"aggregation": aggregation
}
)
return response.json()

def compare_chains(
self,
chains: list[str],
metric: str,
aggregation: str = "daily"
) -> dict:
"""Compare metric across chains."""
response = requests.get(
f"{self.base_url}/compare",
headers=self.headers,
params={
"chains": chains,
"metric": metric,
"aggregation": aggregation
}
)
return response.json()

def get_trending_tokens(
self,
chain: str = "ethereum",
limit: int = 10
) -> list:
"""Get trending tokens."""
response = requests.get(
f"{self.base_url}/trending/tokens",
headers=self.headers,
params={"chain": chain, "limit": limit}
)
return response.json()["tokens"]

def get_defi_metrics(self) -> dict:
"""Get DeFi protocol metrics."""
response = requests.get(
f"{self.base_url}/defi/metrics",
headers=self.headers
)
return response.json()

def get_market_overview(self) -> dict:
"""Get market overview."""
response = requests.get(
f"{self.base_url}/market/overview",
headers=self.headers
)
return response.json()

# Usage
client = AnalyticsClient(api_key="YOUR_KEY")

# Get platform overview
overview = client.get_overview()
print(f"Active chains: {overview['active_chains']}")
print(f"Total transactions: {overview['total_transactions']:,}")

# Get transaction volume time series
timeseries = client.get_timeseries(
chain="ethereum",
metric="transaction_volume",
interval="1h",
days=7
)
print(f"Data points: {len(timeseries['data_points'])}")

# Compare gas usage across L2s
comparison = client.compare_chains(
chains=["arbitrum", "optimism", "base"],
metric="gas_usage",
aggregation="daily"
)
for chain, data in comparison["comparison"].items():
if isinstance(data, list) and data:
print(f"{chain}: {data[-1]['value']}")

# Get trending tokens
trending = client.get_trending_tokens(chain="ethereum", limit=5)
for token in trending:
print(f"{token['symbol']}: {token['change_24h']:+.1f}%")

# Get DeFi metrics
defi = client.get_defi_metrics()
print(f"Total TVL: ${defi['tvl'] / 1e9:.1f}B")

# Get market overview
market = client.get_market_overview()
print(f"BTC Dominance: {market['btc_dominance']}%")
print(f"Fear/Greed: {market['fear_greed_index']}")

TypeScript - Analytics Dashboard

interface TimeSeriesPoint {
timestamp: string;
value: number;
}

interface TrendingToken {
symbol: string;
change_24h: number;
volume: number;
}

interface DeFiMetrics {
tvl: number;
volume_24h: number;
protocols: Array<{
name: string;
tvl: number;
dominance: number;
}>;
}

interface MarketOverview {
total_market_cap: number;
btc_dominance: number;
eth_dominance: number;
volume_24h: number;
fear_greed_index: number;
trending_categories: string[];
}

class AnalyticsDashboard {
private apiKey: string;
private baseUrl = 'https://api.axol.io/api/v1/analytics';

constructor(apiKey: string) {
this.apiKey = apiKey;
}

private async fetch<T>(path: string, params?: Record<string, any>): Promise<T> {
const url = new URL(`${this.baseUrl}${path}`);
if (params) {
Object.entries(params).forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach(v => url.searchParams.append(key, v));
} else if (value !== undefined) {
url.searchParams.set(key, String(value));
}
});
}

const response = await fetch(url.toString(), {
headers: { 'X-API-Key': this.apiKey }
});
return response.json();
}

async getTimeSeries(
chain: string,
metric: string,
interval = '1h'
): Promise<TimeSeriesPoint[]> {
const data = await this.fetch<{ data_points: TimeSeriesPoint[] }>(
'/timeseries',
{ chain, metric, interval }
);
return data.data_points;
}

async compareChains(
chains: string[],
metric: string
): Promise<Record<string, TimeSeriesPoint[]>> {
const data = await this.fetch<{ comparison: Record<string, TimeSeriesPoint[]> }>(
'/compare',
{ chains, metric }
);
return data.comparison;
}

async getTrendingTokens(chain = 'ethereum', limit = 10): Promise<TrendingToken[]> {
const data = await this.fetch<{ tokens: TrendingToken[] }>(
'/trending/tokens',
{ chain, limit }
);
return data.tokens;
}

async getDeFiMetrics(): Promise<DeFiMetrics> {
return this.fetch<DeFiMetrics>('/defi/metrics');
}

async getMarketOverview(): Promise<MarketOverview> {
return this.fetch<MarketOverview>('/market/overview');
}

async getChainComparison(metric: string): Promise<void> {
const l2Chains = ['arbitrum', 'optimism', 'base', 'polygon'];
const comparison = await this.compareChains(l2Chains, metric);

console.log(`\n${metric.toUpperCase()} by Chain:`);
for (const [chain, data] of Object.entries(comparison)) {
if (Array.isArray(data) && data.length > 0) {
const latest = data[data.length - 1];
console.log(` ${chain}: ${latest.value.toLocaleString()}`);
}
}
}
}

// Usage
const dashboard = new AnalyticsDashboard(process.env.AXOL_API_KEY!);

async function main() {
// Market overview
const market = await dashboard.getMarketOverview();
console.log('=== Market Overview ===');
console.log(`Market Cap: $${(market.total_market_cap / 1e12).toFixed(2)}T`);
console.log(`BTC: ${market.btc_dominance}% | ETH: ${market.eth_dominance}%`);
console.log(`Fear/Greed: ${market.fear_greed_index}`);
console.log(`Trending: ${market.trending_categories.join(', ')}`);

// DeFi metrics
const defi = await dashboard.getDeFiMetrics();
console.log('\n=== DeFi Metrics ===');
console.log(`Total TVL: $${(defi.tvl / 1e9).toFixed(1)}B`);
console.log('Top Protocols:');
defi.protocols.forEach(p => {
console.log(` ${p.name}: $${(p.tvl / 1e9).toFixed(1)}B (${p.dominance}%)`);
});

// Trending tokens
const trending = await dashboard.getTrendingTokens('ethereum', 5);
console.log('\n=== Trending Tokens ===');
trending.forEach(token => {
const direction = token.change_24h >= 0 ? '+' : '';
console.log(` ${token.symbol}: ${direction}${token.change_24h.toFixed(1)}%`);
});

// Chain comparison
await dashboard.getChainComparison('transaction_volume');
}

main();

Best Practices

1. Use Appropriate Aggregation

Time RangeRecommended Aggregation
< 24 hourshourly
1-7 daysdaily
1-4 weeksdaily or weekly
> 1 monthweekly or monthly

2. Cache Analytics Data

Analytics data updates periodically. Cache for efficiency:

from functools import lru_cache
import time

@lru_cache(maxsize=50)
def get_cached_analytics(chain: str, metric: str, ttl_hash: int):
return client.get_chain_data(chain, metric)

def get_analytics(chain: str, metric: str, cache_minutes: int = 5):
ttl_hash = int(time.time() / (cache_minutes * 60))
return get_cached_analytics(chain, metric, ttl_hash)

3. Handle Missing Data

Some metrics may not be available for all chains:

def safe_compare(chains: list[str], metric: str) -> dict:
result = client.compare_chains(chains, metric)
return {
chain: data
for chain, data in result["comparison"].items()
if not isinstance(data, dict) or "error" not in data
}

See Also