Cambrian Token Price (Hourly) API
GET /api/v1/evm/price-hour
EVM Token Price (Hourly)
Returns historical hourly price data for a specified EVM token with timestamps in UTC format. This endpoint provides up to 1000 hours of historical pricing data for any valid token address.
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 | true | - | Token address (must match pattern: ^0x[a-fA-F0-9]{40}$). See tokens for valid address for a chain |
| hours | integer | true | - | Maximum number of hours to return (minimum: 1, maximum: 1000) |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| chainId | UInt32 | The blockchain network ID (e.g., 8453 for Base) |
| tokenAddress | FixedString(42) | The contract address of the token |
| symbol | FixedString(50) | The token symbol/ticker (e.g., cbBTC) |
| blockHour | DateTime('UTC') | The hour timestamp in UTC format |
| priceUSD | Float64 | The token price in USD for that hour |
Examples
1. Get Recent 5 Hours of cbBTC Price Data
This example demonstrates retrieving the last 5 hours of price data for cbBTC token on Base network.
curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&hours=5" \
-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-01-28T12:00:00+00:00",
89747.61787540544
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T11:00:00+00:00",
89979.74280452367
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T10:00:00+00:00",
89334.17573609052
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T09:00:00+00:00",
89401.73236642826
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T08:00:00+00:00",
88819.26929983658
]
],
"rows": 5
}
The response shows cbBTC price data on Base network (chainId: 8453) for the most recent 5 hours, with prices ranging from approximately $88,819 to $89,979 USD, demonstrating the hourly price fluctuations.
2. Extended Historical Analysis
This example shows how to request more extensive historical data for deeper analysis.
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-01-28T12:00:00+00:00",
89747.61787540544
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T11:00:00+00:00",
89979.74280452367
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T10:00:00+00:00",
89334.17573609052
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T09:00:00+00:00",
89401.73236642826
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-01-28T08:00:00+00:00",
88819.26929983658
]
],
"rows": 5
// ... additional rows omitted for brevity
}
This request would return up to 100 hours of historical data, providing a broader view of price trends for comprehensive market analysis and trading strategy development.
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/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://deep42.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 current price of a token calculated based on uniswap v3 and clones liquidity pools/api/v1/evm/tokens- Returns a list of all whitelisted tokens for the specified EVM chain, including their contract addresses, symbols, names, and decimal places/api/v1/evm/dexes- List of DEXes on EVM compatible chains/api/v1/evm/tvl/top-owners- Returns top token holders for a given token address/api/v1/evm/tvl/status- Returns the tokens held by an address