Cambrian V2 - Fee Metrics API
GET /api/v1/evm/aero/v2/fee-metrics
Aerodrome V2 Fee Metrics
Shows daily historical data to understand the fees over time on a pool. This endpoint provides comprehensive fee analytics including APR calculations, volume ratios, and historical fee data for Aerodrome V2 pools.
Business Value
- Pool Performance Analysis: Track fee generation efficiency and profitability of liquidity pools over time
- Yield Optimization: Monitor fee APR to make informed decisions about liquidity provision strategies
- Historical Insights: Access detailed historical fee data to understand trends and patterns in pool activity
- Risk Assessment: Evaluate pool stability and fee consistency for investment decision making
- Competitive Analysis: Compare fee metrics across different pools to identify the most profitable opportunities
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/evm/aero/v2/fee-metrics
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| pool_address | String | Yes | - | Pool address with 0x prefix |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| poolId | String | The pool contract address |
| feeTier | UInt256 | The fee tier of the pool (e.g., 30 for 0.30%) |
| timeframeAt | String | The timeframe period for the metrics (e.g., "7d" for 7 days) |
| feeMetrics | Map(String,Nullable(String)) | Current fee metrics including APR, volume ratio, and fees in USD and tokens |
| historicalFees | Array(Map(String,Nullable(Float64))) | Array of historical fee data with timestamps, volumes, and fee amounts |
| updatedAt | UInt32 | Unix timestamp when the data was last updated |
Examples
1. Get Fee Metrics for Pool
Retrieve comprehensive fee metrics for a specific Aerodrome V2 pool to analyze its performance and fee generation.
curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/fee-metrics?pool_address=0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
{
"columns": [
{
"name": "poolId",
"type": "String"
},
{
"name": "feeTier",
"type": "UInt256"
},
{
"name": "timeframeAt",
"type": "String"
},
{
"name": "feeMetrics",
"type": "Map(String,Nullable(String))"
},
{
"name": "historicalFees",
"type": "Array(Map(String,Nullable(Float64)))"
},
{
"name": "updatedAt",
"type": "UInt32"
}
],
"data": [
[
"0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",
"30",
"7d",
{
"'feeAPR'": "8.76",
"'feeVolumeRatio'": "0.002948",
"'feesToken0'": "28256.515241748002",
"'feesToken1'": "58213.47455947733",
"'feesUSD'": "26866.8"
},
[
{
"'feeVolumeRatio'": 0.003005,
"'feesUSD'": 14157.43,
"'timestamp'": 1768953600.0,
"'volume'": 4711961.95
},
{
"'feeVolumeRatio'": 0.003006,
"'feesUSD'": 9980.77,
"'timestamp'": 1769040000.0,
"'volume'": 3320067.72
},
{
"'feeVolumeRatio'": 0.003004,
"'feesUSD'": 8781.31,
"'timestamp'": 1769126400.0,
"'volume'": 2923591.93
},
{
"'feeVolumeRatio'": 0.003014,
"'feesUSD'": 1674.37,
"'timestamp'": 1769212800.0,
"'volume'": 555566.58
},
{
"'feeVolumeRatio'": 0.00301,
"'feesUSD'": 6582.55,
"'timestamp'": 1769299200.0,
"'volume'": 2187157.68
},
{
"'feeVolumeRatio'": 0.003004,
"'feesUSD'": 7171.06,
"'timestamp'": 1769385600.0,
"'volume'": 2387234.6
},
{
"'feeVolumeRatio'": 0.003006,
"'feesUSD'": 7476.36,
"'timestamp'": 1769472000.0,
"'volume'": 2486914.01
}
],
1769608775
]
],
"rows": 1
}
The response shows the pool has a 0.30% fee tier with an 8.76% APR over the past 7 days. It includes daily fee breakdowns with volume and USD values, providing insights into the pool's fee generation consistency and performance trends.
x402 Payment Option
This endpoint supports pay-per-use access via the x402 payment protocol (v2) — pay $0.05 USDC per request using blockchain micropayments. No API key required.
Quick Start (TypeScript)
npm install @x402/fetch @x402/evm viem
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
"https://deep42.cambrian.network/api/v1/evm/aero/v2/fee-metrics"
);
const data = await response.json();
Quick Start (Python)
pip install "x402[httpx]"
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
async def main():
client = x402Client()
account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
register_exact_evm_client(client, EthAccountSigner(account))
async with x402HttpxClient(client) as http:
response = await http.get("https://deep42.cambrian.network/api/v1/evm/aero/v2/fee-metrics")
print(response.json())
asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns
402 Payment Requiredwith payment details - The x402 SDK automatically signs a payment authorization with your wallet
- The SDK resubmits the request with the signed payment
- Server verifies payment and returns the API response
The x402 SDK handles steps 2–5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request
Related Endpoints
/api/v1/evm/aero/v2/pools- List all Aerodrome V2 pools with basic information