Pool Core Metrics
Retrieves core metrics like fees (total, token0, token1, USD), volume (token0, token1, USD), Total Value Locked (TVL) in USD, and calculated Fee APR for a specific Orca Whirlpool over a given timeframe.
GET
https://api.cambrian.org/solana/orca/pools/fee-metrics
Parameters
pool_address* (string)
The public key address of the Orca Whirlpool.
days* (integer)
The number of past days to include in the analysis (e.g., 1, 7, 30).
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"columns": [
{
"name": "poolId",
"type": "String"
},
{
"name": "timeframe",
"type": "String"
},
{
"name": "feeTier",
"type": "Float64"
},
{
"name": "feesToken0",
"type": "Float64"
},
{
"name": "feesToken1",
"type": "Float64"
},
{
"name": "feesUSD",
"type": "Float64"
},
{
"name": "feeAPR",
"type": "Float64"
},
{
"name": "feeVolumeRatio",
"type": "Float64"
},
{
"name": "volumeToken0",
"type": "Float64"
},
{
"name": "volumeToken1",
"type": "Float64"
},
{
"name": "volumeUSD",
"type": "Float64"
},
{
"name": "tvlUSD",
"type": "Float64"
},
{
"name": "updatedAt",
"type": "DateTime('UTC')"
}
],
"data": [
[
"Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
"7d",
200,
1148.593060639,
85205.761891,
170240.90812355877,
34.120364239580255,
0.00040000010831539264,
2871482.557460238,
213014296.50264,
425602155.0607356,
26016273.712165374,
"2026-08-05T16:03:36+00:00"
]
],
"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. Retrieve 7-day fee metrics for an Orca Whirlpool
Fetches fee, volume, TVL, and APR metrics for a specific Orca Whirlpool over the trailing 7 days.
curl
curl -X GET "https://api.cambrian.org/solana/orca/pools/fee-metrics?pool_address=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE&days=7" \
-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": "timeframe",
10 "type": "String"
11 },
12 {
13 "name": "feeTier",
14 "type": "Float64"
15 },
16 {
17 "name": "feesToken0",
18 "type": "Float64"
19 },
20 {
21 "name": "feesToken1",
22 "type": "Float64"
23 },
24 {
25 "name": "feesUSD",
26 "type": "Float64"
27 },
28 {
29 "name": "feeAPR",
30 "type": "Float64"
31 },
32 {
33 "name": "feeVolumeRatio",
34 "type": "Float64"
35 },
36 {
37 "name": "volumeToken0",
38 "type": "Float64"
39 },
40 {
41 "name": "volumeToken1",
42 "type": "Float64"
43 },
44 {
45 "name": "volumeUSD",
46 "type": "Float64"
47 },
48 {
49 "name": "tvlUSD",
50 "type": "Float64"
51 },
52 {
53 "name": "updatedAt",
54 "type": "DateTime('UTC')"
55 }
56 ],
57 "data": [
58 [
59 "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
60 "7d",
61 200,
62 1148.593060639,
63 85205.761891,
64 170240.90812355877,
65 34.120364239580255,
66 0.00040000010831539264,
67 2871482.557460238,
68 213014296.50264,
69 425602155.0607356,
70 26016273.712165374,
71 "2026-08-05T16:03:36+00:00"
72 ]
73 ],
74 "rows": 1
75 }
76]
2 {
3 "columns": [
4 {
5 "name": "poolId",
6 "type": "String"
7 },
8 {
9 "name": "timeframe",
10 "type": "String"
11 },
12 {
13 "name": "feeTier",
14 "type": "Float64"
15 },
16 {
17 "name": "feesToken0",
18 "type": "Float64"
19 },
20 {
21 "name": "feesToken1",
22 "type": "Float64"
23 },
24 {
25 "name": "feesUSD",
26 "type": "Float64"
27 },
28 {
29 "name": "feeAPR",
30 "type": "Float64"
31 },
32 {
33 "name": "feeVolumeRatio",
34 "type": "Float64"
35 },
36 {
37 "name": "volumeToken0",
38 "type": "Float64"
39 },
40 {
41 "name": "volumeToken1",
42 "type": "Float64"
43 },
44 {
45 "name": "volumeUSD",
46 "type": "Float64"
47 },
48 {
49 "name": "tvlUSD",
50 "type": "Float64"
51 },
52 {
53 "name": "updatedAt",
54 "type": "DateTime('UTC')"
55 }
56 ],
57 "data": [
58 [
59 "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
60 "7d",
61 200,
62 1148.593060639,
63 85205.761891,
64 170240.90812355877,
65 34.120364239580255,
66 0.00040000010831539264,
67 2871482.557460238,
68 213014296.50264,
69 425602155.0607356,
70 26016273.712165374,
71 "2026-08-05T16:03:36+00:00"
72 ]
73 ],
74 "rows": 1
75 }
76]
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/solana/orca/pools/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/solana/orca/pools/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/solana/orca/pools/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/solana/orca/pools/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