Skip to main content
POST
/
api
/
v1
/
developer
/
prices
/
history
Token Prices History
curl --request POST \
  --url https://api.allium.so/api/v1/developer/prices/history \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "addresses": [
    {
      "chain": "string",
      "token_address": "string"
    },
    {
      "chain": "string",
      "token_address": "string"
    }
  ],
  "end_timestamp": "2025-03-07T01:00:00Z",
  "start_timestamp": "2025-03-07T00:00:00Z",
  "time_granularity": "5m"
}'
{
  "items": [
    {
      "mint": "<string>",
      "chain": "<string>",
      "decimals": 123,
      "prices": [
        {
          "timestamp": "2023-11-07T05:31:56Z",
          "price": 123,
          "open": 123,
          "high": 123,
          "close": 123,
          "low": 123
        }
      ]
    }
  ],
  "cursor": "<string>"
}
This endpoint returns the price and OHLC for a list of tokens/chains in a given time window. Prices are calculated as a volume-weighted average and OHLC values are aggregated over DEX trades within the window specified by time_window. Max number of tokens per request: 50

Supported Windows

The following are the supported time windows and their associated retention periods:
WindowRetention
15s5 days
1m30 days
5m30 days
1hAll
1dAll

Supported Chains

Edge Cases

Incomplete Time Windows

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.

Inactive Tokens

For tokens with no trading activity in one of the requested time windows, we intentionally do not return a price in that window. This is a design choice to prevent returning a stale price for an inactive token. It is up to you to decide how you want to handle those cases.

Authorizations

X-API-KEY
string
header
required

Query Parameters

cursor
string

Body

application/json
start_timestamp
string<date-time>
required
end_timestamp
string<date-time>
required
addresses
PayloadTokenAddress · object[]
required
time_granularity
enum<string>
required
Available options:
15s,
1m,
5m,
1h,
1d

Response

Successful Response

items
Items · array
required
  • TokenPriceHistorical
  • TokenPrice
cursor
string | null
I