Solana Token Price (Hourly Interval Aggregated)
Returns the aggregated USD price of a Solana token, grouped by a specified time interval (e.g., 1H, 1D, 1W). For each interval bucket, the endpoint returns the average price along with the number of underlying datapoints used in the calculation.
GET
https://api.cambrian.org/solana/price-hour
Parameters
token_address* (string)
Token program address (base58-44 string). See tokens for valid addresses.
interval* (string)
Time interval for price aggregation. One of: 1H, 2H, 4H, 6H, 8H, 12H, 1D, 3D, 1W, 1M.
limit (integer)
Limit the number of results.
offset (integer)
Offset the results, allows you to skip a number of rows before starting to return rows.
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"columns": [
{
"name": "tokenAddress",
"type": "String"
},
{
"name": "tokenSymbol",
"type": "String"
},
{
"name": "intervalStart",
"type": "DateTime('UTC')"
},
{
"name": "priceUSD",
"type": "Float64"
},
{
"name": "datapoints",
"type": "UInt64"
}
],
"data": [
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T14:00:00+00:00",
73.89083682097075,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T13:00:00+00:00",
74.0340956599602,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T12:00:00+00:00",
73.88464550162668,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T11:00:00+00:00",
73.59140423518488,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T10:00:00+00:00",
73.56725774800141,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T09:00:00+00:00",
73.47087076766317,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T08:00:00+00:00",
73.06897472270381,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T07:00:00+00:00",
72.87077455055025,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T06:00:00+00:00",
72.89854532508471,
1
],
[
"So11111111111111111111111111111111111111112",
"SOL",
"2026-08-07T05:00:00+00:00",
72.64493813154434,
1
]
],
"rows": 10
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
Examples
1. Hourly SOL Price History
Retrieve the most recent hourly-aggregated USD prices for wrapped SOL.
curl
curl -X GET "https://api.cambrian.org/solana/price-hour?token_address=So11111111111111111111111111111111111111112&interval=1H&limit=10" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
JSON
1[
2 {
3 "columns": [
4 {
5 "name": "tokenAddress",
6 "type": "String"
7 },
8 {
9 "name": "tokenSymbol",
10 "type": "String"
11 },
12 {
13 "name": "intervalStart",
14 "type": "DateTime('UTC')"
15 },
16 {
17 "name": "priceUSD",
18 "type": "Float64"
19 },
20 {
21 "name": "datapoints",
22 "type": "UInt64"
23 }
24 ],
25 "data": [
26 [
27 "So11111111111111111111111111111111111111112",
28 "SOL",
29 "2026-08-07T14:00:00+00:00",
30 73.89083682097075,
31 1
32 ],
33 [
34 "So11111111111111111111111111111111111111112",
35 "SOL",
36 "2026-08-07T13:00:00+00:00",
37 74.0340956599602,
38 1
39 ],
40 [
41 "So11111111111111111111111111111111111111112",
42 "SOL",
43 "2026-08-07T12:00:00+00:00",
44 73.88464550162668,
45 1
46 ],
47 [
48 "So11111111111111111111111111111111111111112",
49 "SOL",
50 "2026-08-07T11:00:00+00:00",
51 73.59140423518488,
52 1
53 ],
54 [
55 "So11111111111111111111111111111111111111112",
56 "SOL",
57 "2026-08-07T10:00:00+00:00",
58 73.56725774800141,
59 1
60 ],
61 [
62 "So11111111111111111111111111111111111111112",
63 "SOL",
64 "2026-08-07T09:00:00+00:00",
65 73.47087076766317,
66 1
67 ],
68 [
69 "So11111111111111111111111111111111111111112",
70 "SOL",
71 "2026-08-07T08:00:00+00:00",
72 73.06897472270381,
73 1
74 ],
75 [
76 "So11111111111111111111111111111111111111112",
77 "SOL",
78 "2026-08-07T07:00:00+00:00",
79 72.87077455055025,
80 1
81 ],
82 [
83 "So11111111111111111111111111111111111111112",
84 "SOL",
85 "2026-08-07T06:00:00+00:00",
86 72.89854532508471,
87 1
88 ],
89 [
90 "So11111111111111111111111111111111111111112",
91 "SOL",
92 "2026-08-07T05:00:00+00:00",
93 72.64493813154434,
94 1
95 ]
96 ],
97 "rows": 10
98 }
99]
2 {
3 "columns": [
4 {
5 "name": "tokenAddress",
6 "type": "String"
7 },
8 {
9 "name": "tokenSymbol",
10 "type": "String"
11 },
12 {
13 "name": "intervalStart",
14 "type": "DateTime('UTC')"
15 },
16 {
17 "name": "priceUSD",
18 "type": "Float64"
19 },
20 {
21 "name": "datapoints",
22 "type": "UInt64"
23 }
24 ],
25 "data": [
26 [
27 "So11111111111111111111111111111111111111112",
28 "SOL",
29 "2026-08-07T14:00:00+00:00",
30 73.89083682097075,
31 1
32 ],
33 [
34 "So11111111111111111111111111111111111111112",
35 "SOL",
36 "2026-08-07T13:00:00+00:00",
37 74.0340956599602,
38 1
39 ],
40 [
41 "So11111111111111111111111111111111111111112",
42 "SOL",
43 "2026-08-07T12:00:00+00:00",
44 73.88464550162668,
45 1
46 ],
47 [
48 "So11111111111111111111111111111111111111112",
49 "SOL",
50 "2026-08-07T11:00:00+00:00",
51 73.59140423518488,
52 1
53 ],
54 [
55 "So11111111111111111111111111111111111111112",
56 "SOL",
57 "2026-08-07T10:00:00+00:00",
58 73.56725774800141,
59 1
60 ],
61 [
62 "So11111111111111111111111111111111111111112",
63 "SOL",
64 "2026-08-07T09:00:00+00:00",
65 73.47087076766317,
66 1
67 ],
68 [
69 "So11111111111111111111111111111111111111112",
70 "SOL",
71 "2026-08-07T08:00:00+00:00",
72 73.06897472270381,
73 1
74 ],
75 [
76 "So11111111111111111111111111111111111111112",
77 "SOL",
78 "2026-08-07T07:00:00+00:00",
79 72.87077455055025,
80 1
81 ],
82 [
83 "So11111111111111111111111111111111111111112",
84 "SOL",
85 "2026-08-07T06:00:00+00:00",
86 72.89854532508471,
87 1
88 ],
89 [
90 "So11111111111111111111111111111111111111112",
91 "SOL",
92 "2026-08-07T05:00:00+00:00",
93 72.64493813154434,
94 1
95 ]
96 ],
97 "rows": 10
98 }
99]
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.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/price-hour"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/price-hour"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/price-hour")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/price-hour")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with 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