Cambrian V2 - Fee Metrics API
GET /api/v1/evm/aero/v2/fee-metrics
Aerodrome V2 Fee Metrics
Overview
Returns fee metrics and daily historical fee/volume data for a specific Aerodrome V2 pool over the previous seven completed UTC days. USD-denominated fields are returned as null when a required pool-token price is unavailable.
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://api.cambrian.org/evm/aero/v2/fee-metrics
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| chain_id | integer | No | 8453 | EVM chain ID. |
| pool_address | string | Yes | - | Pool address with 0x prefix |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| poolId | String | Pool contract address (0x-prefixed) |
| feeTier | UInt256 | Pool fee tier |
| timeframeAt | String | Timeframe label for the aggregated metrics (e.g., "7d") |
| feeMetrics | Map(String,Nullable(String)) | Aggregate fee metrics for the timeframe: feeAPR (fee-based annual percentage rate), feeVolumeRatio (fees as a fraction of volume), feesToken0 / feesToken1 (fees accrued in each pool token), feesUsd (total fees in USD, null when a token price is unavailable) |
| historicalFees | Array(Map(String,Nullable(Float64))) | Daily entries for the previous seven completed UTC days, each with feeVolumeRatio, feesUsd (null when a token price is unavailable), timestamp (Unix seconds for the day), and volume (trading volume in USD) |
| updatedAt | UInt32 | Unix timestamp (seconds) when the record was last updated |
| tvlPriceComplete | UInt8 | 1 if all token prices needed for USD calculations were available, 0 otherwise |
Examples
1. Fetch Fee Metrics for a Pool
Retrieves fee metrics and the seven-day historical fee/volume series for a specific Aerodrome V2 pool on Base.
curl -X GET "https://api.cambrian.org/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"
},
{
"name": "tvlPriceComplete",
"type": "UInt8"
}
],
"data": [
[
"0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",
"30",
"7d",
{
"feeAPR": "5.037095",
"feeVolumeRatio": "0.003",
"feesToken0": "11762.110525473",
"feesToken1": "30350.903844302637",
"feesUsd": "24301.576865"
},
[
{
"feeVolumeRatio": 0.003,
"feesUsd": 6546.220184,
"timestamp": 1785283200,
"volume": 2182073.394557
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 4638.387547,
"timestamp": 1785369600,
"volume": 1546129.182205
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 2244.425888,
"timestamp": 1785456000,
"volume": 748141.962749
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 1528.679329,
"timestamp": 1785542400,
"volume": 509559.776427
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 3464.647679,
"timestamp": 1785628800,
"volume": 1154882.559784
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 2277.916267,
"timestamp": 1785715200,
"volume": 759305.422461
},
{
"feeVolumeRatio": 0.003,
"feesUsd": 3601.29997,
"timestamp": 1785801600,
"volume": 1200433.323441
}
],
1785904200,
1
]
],
"rows": 1
}
]
Result collections are limited to 10 items. The pool has a 0.3% fee tier (feeTier: "30"), a 7-day fee APR of ~5.04%, and complete pricing (tvlPriceComplete: 1), so all feesUsd values are populated across the daily history.
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://x402.cambrian.org/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://x402.cambrian.org/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 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request
Related Endpoints
- /evm/aero/v2/pool - Get information for a specific Aerodrome V2 pool. Usd prices, valuations, and APRs are null when a required price is unavailable.
- /evm/aero/v2/pool-volume - Shows recent pool activity and hourly distribution. Usd fields are null when a pool-token price is unavailable.
- /evm/aero/v2/pools - Returns liquidity pools with summary metrics for the previous 7 completed UTC days. Usd prices, valuations, and APRs are null when a required price is unavailable.
- /evm/aero/v2/provider-summary - Provides Aerodrome V2 liquidity-provider summary and portfolio metrics. Portfolio-wide Usd aggregates and weighted APRs are null if any represented position cannot be fully priced; per-pool and per-token values are nullable independently.