Cambrian Token Price (Hourly) API

By Cambrian Network base

GET /api/v1/evm/price-hour

Token Price (Hourly)

Overview

Returns historical hourly price data for a specified EVM token. Prices are returned in USD, one row per hour, ordered from most recent to oldest. Use the /evm/tokens endpoint to discover valid token addresses for a given chain.

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, 56
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 token price was recorded on
tokenAddress String Token contract address
tokenSymbol String Token symbol
blockHour DateTime('UTC') UTC timestamp for the start of the hourly interval
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-10-08T11:00:00+00:00",
        82479.9311306827
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T10:00:00+00:00",
        82814.37607276747
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T09:00:00+00:00",
        82985.23006734521
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T08:00:00+00:00",
        82898.39036856055
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T07:00:00+00:00",
        83002.68057283219
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T06:00:00+00:00",
        82703.62941586076
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T05:00:00+00:00",
        82780.43150863342
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T04:00:00+00:00",
        82588.17462146885
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T03:00:00+00:00",
        82869.57810691524
      ],
      [
        8453,
        "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
        "cbBTC",
        "2026-10-08T02:00:00+00:00",
        83092.23668770715
      ]
    ],
    "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 fluctuating between $82,500 and $83,100 over the queried 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

  1. Send a normal request to the endpoint (no API key needed)
  2. Server returns 402 Payment Required with payment details
  3. The x402 SDK automatically signs a payment authorization with your wallet
  4. The SDK resubmits the request with the signed payment
  5. 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