Cambrian Multi Token Price (Current) API
GET /api/v1/solana/price-multi
Token Price (Multi)
Retrieves current USD prices for multiple Solana tokens by providing their token addresses. Returns pricing data in a structured format with token address, symbol, and USD price for each requested token.
Business Value
- Multi-Token Pricing: Get prices for multiple tokens in a single API call, reducing latency and improving efficiency
- Real-Time Market Data: Access current market prices for immediate trading decisions and portfolio valuation
- Cost-Effective: Bulk pricing reduces API call overhead compared to individual price requests
- Data Consistency: All prices retrieved simultaneously ensure data consistency across token comparisons
- Portfolio Management: Essential for portfolio tracking applications and multi-token analysis workflows
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/solana/price-multi
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| token_addresses | String | Yes | - | Comma-separated list of Solana token program addresses (base58 strings) |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| tokenAddress | String | The Solana token program address (base58 encoded) |
| symbol | String | The token symbol (e.g., SOL, BONK) |
| priceUSD | Float64 | Current price of the token in USD |
Examples
1. Multiple Token Price Lookup
Retrieve current prices for SOL and BONK tokens using their token addresses.
curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-multi?token_addresses=So11111111111111111111111111111111111111112,DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \
-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"
}
],
"data": [
[
"So11111111111111111111111111111111111111112",
"SOL",
127.00249723325373
],
[
"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"Bonk",
0.000008744901316534057
]
],
"rows": 2
}
Returns pricing data for both SOL ($127.00) and BONK ($0.0000087) tokens in a columnar format with 2 rows of data.
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-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-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/token-details-multi- Retrieve comprehensive details for multiple Solana tokens simultaneously/api/v1/solana/ohlcv/token- Get OHLCV data for individual SPL tokens/api/v1/solana/trade-statistics- Get trade analytics and performance metrics for SPL tokens/api/v1/solana/orca/pool-multi- Get comprehensive pool metrics for multiple Orca pools/api/v1/solana/meteora-dlmm/pool-multi- Get comprehensive pool metrics for multiple Meteora DLMM pools