Skip to main content
Returns historical price data for a rolling rate chain. Includes weighted average prices during roll periods when multiple contracts are blended.

Path Parameters

id
string
required
The rate ID or chain ID.

Query Parameters

start_date
datetime
Start of date range (ISO 8601).
end_date
datetime
End of date range (ISO 8601).
interval
string
default:"5min"
Aggregation interval: 1min, 5min, 1hour, 1d.
Parameter naming: This endpoint uses start_date/end_date for time range filtering. The reference rate prices endpoint (/rates/{id}/prices) uses start/end instead. This is a known API-level inconsistency that may be aligned in a future release.

Response

chain_id
string
Chain identifier
prices
array
List of price data points
timestamp
datetime
Price timestamp
price
float
Weighted average price (0.0–1.0 scale)
min_price
float
Minimum price in interval
max_price
float
Maximum price in interval
contracts
array
Contracts contributing to the price at this timestamp
contract_id
string
Contract identifier
weight
float
Contract weight in the blend (0.0–1.0)

Example Response

{
  "chain_id": "pres-2024-2028",
  "prices": [
    {
      "timestamp": "2024-12-01T12:00:00Z",
      "price": 0.68,
      "min_price": 0.67,
      "max_price": 0.69,
      "contracts": [
        { "contract_id": "contract_001", "weight": 0.65 },
        { "contract_id": "contract_002", "weight": 0.35 }
      ]
    }
  ]
}

Roll Weight Calculation

During the roll window, weights transition linearly from the expiring contract to the next contract:
  • Before roll window: Full weight (1.0) on current contract
  • During roll window: Linear interpolation between contracts
  • After roll window: Full weight (1.0) on next contract
Weight formula during roll:
weight_next = (timestamp - roll_start) / (roll_end - roll_start)
weight_current = 1.0 - weight_next

Example

curl "https://v2.api.adj.news/api/v1/rates/pres-2024-2028/chain/prices?interval=1d&start_date=2024-11-01T00:00:00Z&end_date=2024-12-31T00:00:00Z" \
  -H "Authorization: Bearer YOUR_TOKEN"

Errors

StatusDescription
404Rate chain not found
400Invalid interval value