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. The endpoint aggregates on-chain price data by the hour, so you can build price charts, backtest strategies, or analyze historical valuation trends for any ERC-20 token on supported EVM chains.
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://api.cambrian.org/evm/price-hour
Method: GET
Authentication: Required via X-API-Key header
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| chain_id | integer | No | 8453 | EVM chain ID. Enum: 1, 8453, 42161, 4663. |
| token_address | string | Yes | - | Token address. See /evm/tokens for valid addresses for a chain. Pattern: ^0x[a-fA-F0-9]{40}$ |
| limit | integer | No | 100 | Limit the number of results. Minimum 1, maximum 10000. |
| offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. Minimum 0, maximum 100000000. |
Response Field Descriptions
| Response Field | Type | Description |
|---|---|---|
| chainId | UInt16 | EVM chain ID the price data belongs to. |
| tokenAddress | String | Contract address of the token. |
| tokenSymbol | String | Symbol of the token (e.g. cbBTC). |
| blockHour | DateTime('UTC') | UTC timestamp representing the hour bucket for the price. |
| priceUsd | Float64 | Average USD price of the token for that hour. |
Examples
1. Retrieve Recent Hourly Prices for cbBTC on Base
This example fetches the 10 most recent hourly price points for the cbBTC token on Base (chain ID 8453).
curl -X GET "https://api.cambrian.org/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&limit=10" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
[
{
"columns": [
{
"name": "chainId",
"type": "UInt16"
},
{
"name": "tokenAddress",
"type": "String"
},
{
"name": "tokenSymbol",
"type": "String"
},
{
"name": "blockHour",
"type": "DateTime('UTC')"
},
{
"name": "priceUsd",
"type": "Float64"
}
],
"data": [
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T12:00:00+00:00",
85484.35048275832
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T11:00:00+00:00",
85660.1630548977
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T10:00:00+00:00",
85823.12124709152
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T09:00:00+00:00",
85893.11852928296
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T08:00:00+00:00",
86058.88918093036
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T07:00:00+00:00",
86284.40755060862
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T06:00:00+00:00",
86509.16637709492
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T05:00:00+00:00",
86818.12364356779
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T04:00:00+00:00",
86984.51711054386
],
[
8453,
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"2026-09-23T03:00:00+00:00",
86675.12736427186
]
],
"rows": 10
}
]
Note: Result collections are limited to 10 items in this example. The response shows 10 consecutive hourly price points for cbBTC on Base, with priceUsd gradually declining from roughly $86,985 to $85,484 over the shown window.
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.org/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.org/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 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request