Cambrian Token Price (Hourly) API
GET /api/v1/evm/price-hour
Token Price (Hourly)
Overview
Returns historical hourly price data for a specified EVM token. This endpoint provides granular price history aggregated per hour, allowing analysis of price trends over time. Data is limited to a maximum of 1000 hours and timestamps are returned in UTC format.
Business Value
- Historical Price Analysis: Track price movements and trends over specific hourly intervals for investment research
- Trading Strategy Development: Access precise historical data points for backtesting and algorithm development
- Market Research: Analyze price volatility patterns and market behavior during specific time periods
- Portfolio Performance: Monitor historical value changes of token holdings with granular hour-by-hour precision
- Risk Management: Identify price patterns and volatility metrics for better risk assessment
Endpoint Details
URL:
https://opabinia.cambrian.network/api/v1/evm/price-hour
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| token_address | string | Yes | - | Token contract address. Must match pattern ^0x[a-fA-F0-9]{40}$. See /evm/tokens for valid addresses per chain. |
| hours | integer | Yes | - | Maximum number of hours of historical data to return. Minimum: 1, Maximum: 1000. |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| chainId | UInt32 | The numeric chain ID of the EVM network (e.g., 8453 for Base). |
| tokenAddress | FixedString(42) | The token contract address in lowercase hex format. |
| symbol | FixedString(50) | The token ticker symbol (e.g., cbBTC). |
| blockHour | DateTime('UTC') | The UTC timestamp representing the start of the one-hour interval (ISO 8601 format). |
| priceUSD | Float64 | The token price in USD for the given hour, calculated from on-chain liquidity pool data. |
Examples
1. Retrieve Last 100 Hours of cbBTC Price History on Base
Fetches 100 hours of hourly USD price data for cbBTC (0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf) on Base (chain ID 8453).
curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&hours=100" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
{
"columns": [
{
"name": "chainId",
"type": "UInt32"
},
{
"name": "tokenAddress",
"type": "FixedString(42)"
},
{
"name": "symbol",
"type": "FixedString(50)"
},
{
"name": "blockHour",
"type": "DateTime('UTC')"
},
{
"name": "priceUSD",
"type": "Float64"
}
],
"data": [
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T16:00:00+00:00",
62608.42348681131
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T15:00:00+00:00",
62319.37357779038
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T14:00:00+00:00",
63767.65501562685
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T13:00:00+00:00",
63913.57392072507
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T12:00:00+00:00",
64298.31267618893
]
],
"rows": 5
// ... additional rows omitted for brevity
}
The response returns hourly price records in descending chronological order. Each row contains the chain ID, token address, symbol, the UTC timestamp of the hour block, and the USD price at that hour. The rows field indicates the total number of records in the full (untruncated) response.
2. Retrieve Maximum Historical Price Data (1000 Hours)
Fetches the maximum allowed 1000 hours (~41 days) of hourly price data for cbBTC, suitable for longer-term trend analysis.
curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&hours=1000" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
{
"columns": [
{
"name": "chainId",
"type": "UInt32"
},
{
"name": "tokenAddress",
"type": "FixedString(42)"
},
{
"name": "symbol",
"type": "FixedString(50)"
},
{
"name": "blockHour",
"type": "DateTime('UTC')"
},
{
"name": "priceUSD",
"type": "Float64"
}
],
"data": [
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T16:00:00+00:00",
62608.42348681131
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T15:00:00+00:00",
62319.37357779038
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T14:00:00+00:00",
63767.65501562685
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T13:00:00+00:00",
63913.57392072507
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-06-18T12:00:00+00:00",
64298.31267618893
]
],
"rows": 5
// ... additional rows omitted for brevity
}
Setting hours=1000 returns the maximum allowed historical window. This is ideal for charting multi-week price trends and computing indicators such as moving averages over extended periods.
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/evm/price-hour"
);
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/evm/price-hour")
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/evm/price-current- Returns the current price of a token calculated based on Uniswap V3 and clone liquidity pools./api/v1/evm/tokens- Returns a list of all whitelisted tokens for the specified EVM chain, including contract addresses, symbols, names, and decimal places./api/v1/evm/aero/v2/pool-volume- Provides aggregate volume statistics over a timeframe with hourly data for Aerodrome V2 pools./api/v1/evm/aero/v3/pool- Returns current pool TVL, swap volume, fees APR, and other metrics for an Aerodrome V3 pool.