POST
/
api
/
v1
/
developer
/
prices
/
historical
curl --request POST \
  --url https://api.allium.so/api/v1/developer/prices/historical \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "chain": "string",
  "end_timestamp": "2025-03-07T01:00:00Z",
  "start_timestamp": "2025-03-07T00:00:00Z",
  "time_granularity": "1m",
  "token_address": "string"
}'
{
  "items": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "chain": "<string>",
      "mint": "<string>",
      "decimals": 123,
      "price": 123,
      "open": 123,
      "high": 123,
      "close": 123,
      "low": 123,
      "volume": 123,
      "trade_count": 123
    }
  ],
  "cursor": "<string>"
}

This endpoint returns the price and OHCLV for a token in a given time window. Prices are calculated as a volume weighted average and OHCLV values are aggregated over DEX trades within some window depending on the value provided for time_window. The following are the supported windows and their associated retentions periods:

WindowRetention
15s3 hours
1m3 days
5m3 days
1hAll
1dAll

Supported Chains

  • Arbitrum
  • Base
  • Ehtereum
  • Optimism
  • Solana

Supported Protocols

  • AMM & Liquidity Pool DEXs: Orca, Raydium, Saber, Lifinity, Mercurial, Cropper, Fluxbeam, Crema, Invariant, GooseFX, Meteora
  • Order Book DEXs: OpenBook, Phoenix
  • Aggregators & Trading Focused DEXs: Jupiter, Marinade, Symmetry, Pumpfun
Performance MetricsValue
PaginationUp to 50 tokens per request
Metadata SupportToken decimals, token symbol
Data Freshnessp50 4s

Edge Cases

This endpoint returns price data for the current time window, even if it’s incomplete. For example, if the API is called at 10:30, the latest hourly datapoint for 10:00 is based on trades from 10:00 to 10:30. If called at 10:45, the 10:00 datapoint will be finalized, reflecting a full hour of trades. Users should account for this when handling near-real-time data.

Authorizations

X-API-KEY
string
header
required

Query Parameters

cursor
string

Body

application/json
chain
string
required
token_address
string
required
time_granularity
enum<string>
required
Available options:
15s,
1m,
5m,
1h,
1d
start_timestamp
string
required
end_timestamp
string
required

Response

200
application/json
Successful Response
items
object[]
required
cursor
string | null