Cambrian Pool Info API

By Cambrian Network solana

GET /api/v1/solana/orca/pool

Orca Pool Info

Overview

Retrieves detailed metrics and information for a specific Solana Orca Whirlpool, identified by its program ID (pool address). Data is sourced from the pre-calculated orca_pool_details_view, providing token pair details, pricing, liquidity, volume, fees, and APR in a single call.

Business Value

  • Pool Analysis: Access comprehensive pool data for liquidity providers and traders
  • Trading Intelligence: Monitor pool state and configuration for informed trading decisions
  • Portfolio Management: Track pool performance and composition for investment strategies
  • DeFi Integration: Enable seamless integration with Orca DEX functionality
  • Risk Assessment: Evaluate pool parameters and liquidity for risk management

Endpoint Details

URL:

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

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

Query Parameters

Parameter Type Required Default Description
pool_address string Yes - The program ID (address) of the Solana pool.

Response Field Descriptions

Response Field Type Description
poolAddress String The program ID (address) of the Orca pool.
createdAt DateTime('UTC') Timestamp when the pool was created.
token0Address String Mint address of the pool's first token.
token0Symbol String Symbol of the pool's first token.
token0Decimals UInt8 Decimal precision of the first token.
token1Address String Mint address of the pool's second token.
token1Symbol String Symbol of the pool's second token.
token1Decimals UInt8 Decimal precision of the second token.
tickSpacing Int32 Tick spacing configured for the Whirlpool.
tokenVaultA String Address of the vault holding token0 reserves.
tokenVaultB String Address of the vault holding token1 reserves.
sqrtPriceX64 UInt128 Current pool price expressed as sqrt price in X64 fixed-point format.
currentTick Nullable(Float64) Current tick index of the pool.
price Nullable(Float64) Current price of token0 denominated in token1.
tvlToken0 Nullable(Float64) Total value locked, denominated in token0 units.
tvlToken1 Nullable(Float64) Total value locked, denominated in token1 units.
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 token0 over the last 24 hours.
fees24hToken1 Nullable(Float64) Fees collected in token1 over the last 24 hours.
fees24h Nullable(Float64) Total fees collected in USD over the last 24 hours.
apr24h Nullable(Float64) Annualized fee return based on the last 24 hours, as a percentage.
priceVolatility Nullable(Float64) Measure of price volatility for the pool.
utilization24h Nullable(Float64) Capital utilization rate over the last 24 hours, as a percentage.
factoryAddress String Address of the Whirlpool program/factory that deployed the pool.
factoryName String Name of the DEX factory (e.g., "Orca").

Examples

1. Retrieve Pool Details by Address

Fetch detailed metrics for a specific Orca Whirlpool using its pool address.

curl -X GET "https://api.cambrian.org/solana/orca/pool?pool_address=C9U2Ksk6KKWvLEeo5yUQ7Xu46X7NzeBJtd9PBfuXaUSM" \
  -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": [
      [
        "C9U2Ksk6KKWvLEeo5yUQ7Xu46X7NzeBJtd9PBfuXaUSM",
        "2024-11-05T15:28:26+00:00",
        "So11111111111111111111111111111111111111112",
        "SOL",
        9,
        "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
        "Fartcoin ",
        6,
        16,
        "2z2dj8yyRmXP8bwP8LqmxeZGVtuAGv4g2wgzp2Rz1QmJ",
        "5ex8weR6VjuwTrE4aP7juXcGWPTiD9PJeMZiwZZderqc",
        13735471750913987000,
        -5899,
        554.4312681473452,
        513.063738712,
        3026275.207763,
        442518.7406462651,
        183687.0133043752,
        2.034516841,
        1071.825864,
        293.8993353164525,
        24.241517372539,
        8.233664334234783,
        8.329166666666667,
        "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
        "Orca"
      ]
    ],
    "rows": 1
  }
]

Result collections are limited to 10 items. This example returns the SOL/Fartcoin Orca Whirlpool, with a TVL of approximately $3.03M, 24h volume of ~$442.5K, and a 24h fee APR of ~24.24%.

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/solana/orca/pool"
);
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")
        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