Cambrian Pool Core Metrics API

By Cambrian Network solana

GET /api/v1/solana/orca/pools/fee-metrics

Pool Core Metrics

Overview

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.

Business Value

  • Portfolio Performance: Track fee earnings from your liquidity provider positions to understand profitability
  • Pool Analytics: Compare fee APR across different pools to identify high-yield opportunities
  • Risk Assessment: Monitor volume ratios and TVL changes to evaluate pool health and impermanent loss risks
  • Strategy Optimization: Analyze fee collection trends to optimize entry/exit timing for LP positions
  • Yield Farming: Identify pools with consistently high fee generation for maximized returns

Endpoint Details

URL:

https://api.cambrian.org/solana/orca/pools/fee-metrics

Method: GET
Authentication: Required via X-API-Key header

Query Parameters

Parameter Type Required Default Description
pool_address string Yes - The public key address of the Orca Whirlpool.
days integer Yes - The number of past days to include in the analysis (e.g., 1, 7, 30).

Response Field Descriptions

Response Field Type Description
poolId String The public key address of the Orca Whirlpool.
timeframe String The timeframe of the analysis, expressed in days (e.g., "7d").
feeTier Float64 The fee tier of the pool, in basis points.
feesToken0 Float64 Total fees collected in token0 over the timeframe.
feesToken1 Float64 Total fees collected in token1 over the timeframe.
feesUSD Float64 Total fees collected, converted to USD, over the timeframe.
feeAPR Float64 Calculated annualized fee yield (APR) based on fees and TVL.
feeVolumeRatio Float64 Ratio of fees generated to trading volume over the timeframe.
volumeToken0 Float64 Total trading volume in token0 over the timeframe.
volumeToken1 Float64 Total trading volume in token1 over the timeframe.
volumeUSD Float64 Total trading volume, converted to USD, over the timeframe.
tvlUSD Float64 Total Value Locked in the pool, in USD, at time of the query.
updatedAt DateTime('UTC') Timestamp of when the metrics were last updated.

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 -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:

[
  {
    "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
  }
]

Result collections are limited to 10 items. In this example, the pool Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE earned approximately $170,240.91 in fees on ~$425.6M of volume over the trailing 7 days, with a Fee APR of ~34.12% against a TVL of ~$26M.

x402 Payment Option

This endpoint supports pay-per-use access via the x402 payment protocol (v2), paying $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/solana/orca/pools/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/solana/orca/pools/fee-metrics")
        print(response.json())

asyncio.run(main())

Payment Flow

  1. Send a normal request to the endpoint (no API key needed)
  2. Server returns 402 Payment Required with payment details
  3. The x402 SDK automatically signs a payment authorization with your wallet
  4. The SDK resubmits the request with the signed payment
  5. 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