POST
/
api
/
v1
/
developer
/
prices
/
at-timestamp
Get Prices At Timestamp
curl --request POST \
  --url https://api.allium.so/api/v1/developer/prices/at-timestamp \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "addresses": [
    {
      "chain": "string",
      "token_address": "string"
    },
    {
      "chain": "string",
      "token_address": "string"
    }
  ],
  "staleness_tolerance": "1h",
  "time_granularity": "5m",
  "timestamp": "2025-03-07T00:00:00Z"
}'
{
  "items": [
    {
      "input_timestamp": "2023-11-07T05:31:56Z",
      "price_timestamp": "2023-11-07T05:31:56Z",
      "mint": "<string>",
      "chain": "<string>",
      "price": 123
    }
  ],
  "cursor": "<string>"
}
This endpoint returns the price of a token at a given timestamp. If the token doesn’t have a price at the given timestamp (because there weren’t any trades at that time), the price will be the price at the closest timestamp before the given timestamp. Use staleness_tolerance to specify the max lookback time for a price. time_granularity is the size of the aggregation window. It can be one of the following values: 15s, 1m, 5m, 1h, 1d. staleness_tolerance is an optional string contain the number of seconds, minutes, hours or days. For example: 60s, 5m, 2h, 2d for example. The default values are as follow:
Time GranularityDefault Staleness Tolerance
15s60s
1m5m
5m10m
1h2h
1d2d
Response: The response contains two timestamps:
  • input_timestamp: The requested timestamp in the payload
  • price_timestamp: The timestamp of the latest price found for the token
Pagination: This endpoint returns prices for up to 200 tokens in a single request. Supported Chains

Authorizations

X-API-KEY
string
header
required

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.