Aerodrome V2 Fee Metrics
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.
GET
https://api.cambrian.org/evm/aero/v2/fee-metrics
Parameters
chain_id (integer)
EVM chain ID.
pool_address* (string)
Pool address with 0x prefix
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"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
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
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
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:
JSON
1[
2 {
3 "columns": [
4 {
5 "name": "poolId",
6 "type": "String"
7 },
8 {
9 "name": "feeTier",
10 "type": "UInt256"
11 },
12 {
13 "name": "timeframeAt",
14 "type": "String"
15 },
16 {
17 "name": "feeMetrics",
18 "type": "Map(String,Nullable(String))"
19 },
20 {
21 "name": "historicalFees",
22 "type": "Array(Map(String,Nullable(Float64)))"
23 },
24 {
25 "name": "updatedAt",
26 "type": "UInt32"
27 },
28 {
29 "name": "tvlPriceComplete",
30 "type": "UInt8"
31 }
32 ],
33 "data": [
34 [
35 "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",
36 "30",
37 "7d",
38 {
39 "feeAPR": "5.037095",
40 "feeVolumeRatio": "0.003",
41 "feesToken0": "11762.110525473",
42 "feesToken1": "30350.903844302637",
43 "feesUsd": "24301.576865"
44 },
45 [
46 {
47 "feeVolumeRatio": 0.003,
48 "feesUsd": 6546.220184,
49 "timestamp": 1785283200,
50 "volume": 2182073.394557
51 },
52 {
53 "feeVolumeRatio": 0.003,
54 "feesUsd": 4638.387547,
55 "timestamp": 1785369600,
56 "volume": 1546129.182205
57 },
58 {
59 "feeVolumeRatio": 0.003,
60 "feesUsd": 2244.425888,
61 "timestamp": 1785456000,
62 "volume": 748141.962749
63 },
64 {
65 "feeVolumeRatio": 0.003,
66 "feesUsd": 1528.679329,
67 "timestamp": 1785542400,
68 "volume": 509559.776427
69 },
70 {
71 "feeVolumeRatio": 0.003,
72 "feesUsd": 3464.647679,
73 "timestamp": 1785628800,
74 "volume": 1154882.559784
75 },
76 {
77 "feeVolumeRatio": 0.003,
78 "feesUsd": 2277.916267,
79 "timestamp": 1785715200,
80 "volume": 759305.422461
81 },
82 {
83 "feeVolumeRatio": 0.003,
84 "feesUsd": 3601.29997,
85 "timestamp": 1785801600,
86 "volume": 1200433.323441
87 }
88 ],
89 1785904200,
90 1
91 ]
92 ],
93 "rows": 1
94 }
95]
2 {
3 "columns": [
4 {
5 "name": "poolId",
6 "type": "String"
7 },
8 {
9 "name": "feeTier",
10 "type": "UInt256"
11 },
12 {
13 "name": "timeframeAt",
14 "type": "String"
15 },
16 {
17 "name": "feeMetrics",
18 "type": "Map(String,Nullable(String))"
19 },
20 {
21 "name": "historicalFees",
22 "type": "Array(Map(String,Nullable(Float64)))"
23 },
24 {
25 "name": "updatedAt",
26 "type": "UInt32"
27 },
28 {
29 "name": "tvlPriceComplete",
30 "type": "UInt8"
31 }
32 ],
33 "data": [
34 [
35 "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",
36 "30",
37 "7d",
38 {
39 "feeAPR": "5.037095",
40 "feeVolumeRatio": "0.003",
41 "feesToken0": "11762.110525473",
42 "feesToken1": "30350.903844302637",
43 "feesUsd": "24301.576865"
44 },
45 [
46 {
47 "feeVolumeRatio": 0.003,
48 "feesUsd": 6546.220184,
49 "timestamp": 1785283200,
50 "volume": 2182073.394557
51 },
52 {
53 "feeVolumeRatio": 0.003,
54 "feesUsd": 4638.387547,
55 "timestamp": 1785369600,
56 "volume": 1546129.182205
57 },
58 {
59 "feeVolumeRatio": 0.003,
60 "feesUsd": 2244.425888,
61 "timestamp": 1785456000,
62 "volume": 748141.962749
63 },
64 {
65 "feeVolumeRatio": 0.003,
66 "feesUsd": 1528.679329,
67 "timestamp": 1785542400,
68 "volume": 509559.776427
69 },
70 {
71 "feeVolumeRatio": 0.003,
72 "feesUsd": 3464.647679,
73 "timestamp": 1785628800,
74 "volume": 1154882.559784
75 },
76 {
77 "feeVolumeRatio": 0.003,
78 "feesUsd": 2277.916267,
79 "timestamp": 1785715200,
80 "volume": 759305.422461
81 },
82 {
83 "feeVolumeRatio": 0.003,
84 "feesUsd": 3601.29997,
85 "timestamp": 1785801600,
86 "volume": 1200433.323441
87 }
88 ],
89 1785904200,
90 1
91 ]
92 ],
93 "rows": 1
94 }
95]
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.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/evm/aero/v2/fee-metrics"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/evm/aero/v2/fee-metrics"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/evm/aero/v2/fee-metrics")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/evm/aero/v2/fee-metrics")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with 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