Cambrian Token Price and Volume (Multi) API
GET /api/v1/solana/price-volume/multi
Token Price and Volume (Multi)
Retrieve current USD price, timeframe volume, and percentage changes for multiple SPL tokens in a single request. Combines price and volume data to reduce API calls and improve application performance with data aggregated across major Solana DEXs.
Business Value
- Multi-token Efficiency: Query up to 50 tokens simultaneously, reducing API calls by 50x compared to individual requests
- Real-time Price Tracking: Get current USD prices with timestamp precision for accurate market data
- Volume Analytics: Track trading volume and percentage changes over customizable timeframes (1h-24h)
- Performance Optimization: Single-request design minimizes latency for portfolio and dashboard applications
- Cross-DEX Aggregation: Consolidated data from major Solana decentralized exchanges for comprehensive market coverage
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/solana/price-volume/multi
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| token_addresses | String | Yes | - | Comma-separated SPL token mint addresses (max 50, base58) |
| timeframe | String | Yes | - | Timeframe for volume and change calculations: 1h, 2h, 4h, 8h, 24h |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| tokenAddress | String | SPL token mint address |
| symbol | String | Token symbol (e.g., SOL, USDC) |
| priceUSD | Float64 | Current token price in USD |
| updateUnixTime | UInt32 | Unix timestamp of last price update |
| volumeUSD | Float64 | Trading volume in USD for the specified timeframe |
| volumeChangePercent | Float64 | Volume change percentage compared to previous timeframe |
| priceChangePercent | Float64 | Price change percentage for the specified timeframe |
| priceChangeUSD | Float64 | Absolute price change in USD for the specified timeframe |
Examples
1. Single Token Price and Volume Data
Query current price and 24-hour volume data for SOL token.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-volume/multi?token_addresses=So11111111111111111111111111111111111111112&timeframe=24h" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
[
{
"columns": [
{
"name": "tokenAddress",
"type": "String"
},
{
"name": "symbol",
"type": "String"
},
{
"name": "priceUSD",
"type": "Float64"
},
{
"name": "updateUnixTime",
"type": "UInt32"
},
{
"name": "volumeUSD",
"type": "Float64"
},
{
"name": "volumeChangePercent",
"type": "Nullable(Float64)"
},
{
"name": "priceChangePercent",
"type": "Nullable(Float64)"
},
{
"name": "priceChangeUSD",
"type": "Float64"
}
],
"data": [
[
"So11111111111111111111111111111111111111112",
"SOL",
126.78800000000001,
1769609738,
8306580577.1,
16.47,
2.46,
3.038481025336324
]
],
"rows": 1
}
]
The response shows SOL trading at $126.79 with $8.31B in 24-hour volume, up 2.46% in price and 16.47% in volume compared to the previous 24-hour period.
2. Multiple Tokens with Shorter Timeframe
Query 4-hour price and volume changes for multiple popular Solana tokens.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-volume/multi?token_addresses=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&timeframe=4h" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
[
{
"columns": [
{
"name": "tokenAddress",
"type": "String"
},
{
"name": "symbol",
"type": "String"
},
{
"name": "priceUSD",
"type": "Float64"
},
{
"name": "updateUnixTime",
"type": "UInt32"
},
{
"name": "volumeUSD",
"type": "Float64"
},
{
"name": "volumeChangePercent",
"type": "Nullable(Float64)"
},
{
"name": "priceChangePercent",
"type": "Nullable(Float64)"
},
{
"name": "priceChangeUSD",
"type": "Float64"
}
],
"data": [
"Multiple token data would appear here with same structure"
],
"rows": 2
}
]
This would return price and volume data for both SOL and USDC tokens over a 4-hour timeframe, enabling shorter-term trading analysis and portfolio tracking.
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/price-volume/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://deep42.cambrian.network/api/v1/solana/price-volume/multi")
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/ohlcv/token- Retrieve Open, High, Low, Close, and Volume data for any SPL token/api/v1/solana/ohlcv/pool- Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis/api/v1/solana/ohlcv/base-quote- Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis