Cambrian Pool Info (Multi) API

By Cambrian Network solana

GET /api/v1/solana/orca/pool-multi

Pool Info (Multi)

Overview

Retrieves overview metrics for multiple Orca pools in a single request, returning price, TVL, volume, fees, APR, and token metadata for each requested pool address.

Business Value

  • Multi-Pool Analysis: Query multiple pools in a single request to reduce API calls and improve performance
  • Real-Time Metrics: Access up-to-date price, volume, and liquidity data for portfolio monitoring
  • TVL Tracking: Monitor total value locked across multiple pools for investment analysis
  • Fee Analytics: Track 24-hour fees and APR calculations for yield farming strategies
  • Market Intelligence: Compare pool performance and volatility metrics across different trading pairs

Endpoint Details

URL:

https://api.cambrian.org/solana/orca/pool-multi

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

Query Parameters

Parameter Type Required Default Description
pool_addresses string Yes - Comma-separated pool addresses within the same DEX. Example: addr1,addr2,addr3

Response Field Descriptions

Response Field Type Description
poolAddress String Pool contract address
createdAt DateTime('UTC') Timestamp when the pool was created
token0Address String Mint address of token 0
token0Symbol String Symbol of token 0
token0Decimals UInt8 Decimal places for token 0
token1Address String Mint address of token 1
token1Symbol String Symbol of token 1
token1Decimals UInt8 Decimal places for token 1
tickSpacing Int32 Tick spacing configured for the pool
tokenVaultA String Address of the vault holding token 0
tokenVaultB String Address of the vault holding token 1
sqrtPriceX64 UInt128 Current square-root price in X64 fixed-point format
currentTick Nullable(Float64) Current tick index of the pool
price Nullable(Float64) Current price of token 0 in terms of token 1
tvlToken0 Nullable(Float64) Total value locked denominated in token 0
tvlToken1 Nullable(Float64) Total value locked denominated in token 1
tvl Nullable(Float64) Total value locked in USD
volume24h Nullable(Float64) Trading volume in USD over the last 24 hours
fees24hToken0 Nullable(Float64) Fees collected in token 0 over the last 24 hours
fees24hToken1 Nullable(Float64) Fees collected in token 1 over the last 24 hours
fees24h Nullable(Float64) Total fees collected in USD over the last 24 hours
apr24h Nullable(Float64) Annualized fee APR based on the last 24 hours
priceVolatility Nullable(Float64) Price volatility measure over the recent period
utilization24h Nullable(Float64) Capital utilization ratio over the last 24 hours
factoryAddress String Address of the Whirlpool program/factory
factoryName String Name of the DEX factory (e.g., Orca)

Examples

1. Retrieve metrics for a single Orca pool

Fetch metrics for the SOL/USDC Orca Whirlpool by passing its pool address.

curl -X GET "https://api.cambrian.org/solana/orca/pool-multi?pool_addresses=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[
  {
    "columns": [
      {
        "name": "poolAddress",
        "type": "String"
      },
      {
        "name": "createdAt",
        "type": "DateTime('UTC')"
      },
      {
        "name": "token0Address",
        "type": "String"
      },
      {
        "name": "token0Symbol",
        "type": "String"
      },
      {
        "name": "token0Decimals",
        "type": "UInt8"
      },
      {
        "name": "token1Address",
        "type": "String"
      },
      {
        "name": "token1Symbol",
        "type": "String"
      },
      {
        "name": "token1Decimals",
        "type": "UInt8"
      },
      {
        "name": "tickSpacing",
        "type": "Int32"
      },
      {
        "name": "tokenVaultA",
        "type": "String"
      },
      {
        "name": "tokenVaultB",
        "type": "String"
      },
      {
        "name": "sqrtPriceX64",
        "type": "UInt128"
      },
      {
        "name": "currentTick",
        "type": "Nullable(Float64)"
      },
      {
        "name": "price",
        "type": "Nullable(Float64)"
      },
      {
        "name": "tvlToken0",
        "type": "Nullable(Float64)"
      },
      {
        "name": "tvlToken1",
        "type": "Nullable(Float64)"
      },
      {
        "name": "tvl",
        "type": "Nullable(Float64)"
      },
      {
        "name": "volume24h",
        "type": "Nullable(Float64)"
      },
      {
        "name": "fees24hToken0",
        "type": "Nullable(Float64)"
      },
      {
        "name": "fees24hToken1",
        "type": "Nullable(Float64)"
      },
      {
        "name": "fees24h",
        "type": "Nullable(Float64)"
      },
      {
        "name": "apr24h",
        "type": "Nullable(Float64)"
      },
      {
        "name": "priceVolatility",
        "type": "Nullable(Float64)"
      },
      {
        "name": "utilization24h",
        "type": "Nullable(Float64)"
      },
      {
        "name": "factoryAddress",
        "type": "String"
      },
      {
        "name": "factoryName",
        "type": "String"
      }
    ],
    "data": [
      [
        "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
        "2023-06-30T06:20:58+00:00",
        "So11111111111111111111111111111111111111112",
        "SOL",
        9,
        "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "USDC",
        6,
        4,
        "EUuUbDcafPrmVTD5M6qoJAoyyNbihBhugADAxRMn5he9",
        "2WLWEuKDgkDUccTpbwYp1GToYktiSB1cXvreHUwiSUVP",
        5021970198956167000,
        -26023,
        74.11546154274731,
        224778.616667182,
        9388870.572549,
        26029285.209932618,
        74632696.36542091,
        200.20386387,
        15032.595722,
        29853.085751549406,
        41.86198818535955,
        0.21357800188961495,
        25.6225,
        "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
        "Orca"
      ]
    ],
    "rows": 1
  }
]

Result collections are limited to 10 items. This example returns the SOL/USDC Whirlpool with a TVL of ~$26M, 24h volume of ~$74.6M, and a 24h fee APR of ~41.86%.

x402 Payment Option

This endpoint supports pay-per-use access via the x402 payment protocol (v2), letting you 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/solana/orca/pool-multi"
);
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/pool-multi")
        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