Cambrian Pool Liquidity Map API
GET /api/v1/solana/orca/pools/liquidity-map
Pool Liquidity Map
Overview
Retrieves the distribution of net liquidity across price ticks for a specific Orca Whirlpool. Returns liquidity values at representative tick intervals based on the specified resolution, enabling detailed visualization of how liquidity is concentrated across the price range. Note: the pool must have been created after 2025-02-27.
Business Value
- Liquidity Analysis: Understand where liquidity is concentrated in Orca pools to identify optimal trading ranges
- Price Impact Assessment: Evaluate potential price impact of trades by analyzing liquidity depth at different price levels
- Pool Health Monitoring: Monitor the distribution and concentration of liquidity to assess pool efficiency
- Trading Strategy Optimization: Identify price ranges with high liquidity for reduced slippage trading
- Market Making Insights: Determine optimal price ranges for providing liquidity based on current distribution patterns
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/solana/orca/pools/liquidity-map
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. |
| resolution | integer | Yes | - | The approximate number of data points (tick intervals) desired in the output map. Higher values mean finer granularity. Min: 10, Max: 1000. |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| mapTick | Int64 | The price tick index representing a specific price point in the pool's tick space. Negative values represent prices below the pool's base price. |
| liquidity | Int256 | The net liquidity active at this tick interval, expressed as a large integer. Represents the amount of liquidity available for swaps at this price level. |
Examples
1. Fetch Liquidity Map for a Whirlpool at Default Resolution
Retrieve the liquidity distribution across 200 price tick intervals for a specific Orca Whirlpool, useful for rendering a full-range liquidity depth chart.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/liquidity-map?pool_address=DYFk5yvux4mkuQcxkA7H6FWgRQHc1Z7JUb42SJVxnhgG&resolution=200" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
{
"columns": [
{
"name": "mapTick",
"type": "Int64"
},
{
"name": "liquidity",
"type": "Int256"
}
],
"data": [
[
-443632,
"1388308015"
],
[
-439200,
"1388308015"
],
[
-434768,
"1388308015"
],
[
-430336,
"1388308015"
],
[
-425904,
"1388308015"
]
],
"rows": 201
// ... additional rows omitted for brevity
}
The response returns 201 tick intervals covering the full price range of the pool. Each row contains a mapTick (price tick index) and the corresponding liquidity value at that tick. The uniform liquidity value of 1388308015 across these ticks indicates even distribution of liquidity across the lower end of the price range.
2. Fetch High-Resolution Liquidity Map for Detailed Analysis
Use a higher resolution to get finer granularity for a detailed view of liquidity concentration, suitable for slippage modeling or identifying price-range gaps.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/liquidity-map?pool_address=DYFk5yvux4mkuQcxkA7H6FWgRQHc1Z7JUb42SJVxnhgG&resolution=1000" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
{
"columns": [
{
"name": "mapTick",
"type": "Int64"
},
{
"name": "liquidity",
"type": "Int256"
}
],
"data": [
[
-443632,
"1388308015"
],
[
-442746,
"1388308015"
],
[
-441860,
"1388308015"
],
[
-440974,
"1388308015"
],
[
-440088,
"1388308015"
]
],
"rows": 1001
// ... additional rows omitted for brevity
}
At resolution 1000, the tick intervals are much finer (approximately 886 ticks apart vs ~4432 at resolution 200), providing a more granular view of liquidity distribution. This is ideal for precise slippage calculations or detailed chart rendering.
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.network/api/v1/solana/orca/pools/liquidity-map"
);
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.network/api/v1/solana/orca/pools/liquidity-map")
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- Retrieves a list of all Orca pools registered in the backend database with essential static information./api/v1/solana/orca/pools/fee-metrics- Retrieves core fee metrics, volume, TVL, and fee APR for a specific Orca Whirlpool over a given timeframe./api/v1/solana/orca/pools/fee-ranges- Retrieves fee APR and swap utilization data categorized by price ranges relative to the current price./api/v1/solana/orca/pools/historical-data- Retrieves historical daily fee and volume data in USD for a specific Orca Whirlpool./api/v1/solana/orca/pool- Retrieves detailed metrics and information for a specific Orca pool by address.