Cambrian Pool Historical Daily Data API
GET /api/v1/solana/orca/pools/historical-data
Pool Historical Daily Data
Retrieves historical daily fee and volume data (in USD) for a specific Orca Whirlpool over a specified timeframe. This endpoint provides insights into pool performance and activity trends.
Business Value
- Pool Performance Analysis: Track fee generation and trading volume trends over time to assess pool profitability
- Liquidity Strategy Optimization: Analyze historical data to optimize liquidity provision timing and amounts
- Investment Decision Making: Use historical volume and fee data to inform decisions about which pools to participate in
- Risk Management: Monitor pool activity patterns to identify potential risks or opportunities
- Portfolio Tracking: Track the historical performance of pools in your liquidity portfolio
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data
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 |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| columns | array | Empty array indicating no data available |
| data | array | Empty array indicating no historical data |
| rows | integer | Number of rows (0 when no data available) |
Examples
1. Basic Pool Historical Data Query
Retrieve 7 days of historical data for an Orca Whirlpool to analyze recent performance trends.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data?pool_address=whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc&days=7" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
[
{
"columns": [],
"data": [],
"rows": 0
}
]
The response indicates that no historical data is available for the specified pool and time period. This could mean the pool is newly created or has had no activity during the requested timeframe.
2. Extended Historical Analysis
Retrieve 30 days of historical data for comprehensive pool performance analysis.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data?pool_address=whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc&days=30" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
[
{
"columns": [],
"data": [],
"rows": 0
}
]
Similar to the shorter timeframe, no historical data is available for this pool over the 30-day period.
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://deep42.cambrian.network/api/v1/solana/orca/pools/historical-data"
);
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://deep42.cambrian.network/api/v1/solana/orca/pools/historical-data")
print(response.json())
asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns
402 Payment Requiredwith 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–5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request
Related Endpoints
/api/v1/solana/orca/pools- List of available Orca pools