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

Response

chain_id
string
Chain identifier
prices
array
List of price data points
timestamp
datetime
Price timestamp
price
float
Weighted average price
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
        }
      ]
    },
    {
      "timestamp": "2024-12-01T12:05:00Z",
      "price": 0.67,
      "min_price": 0.66,
      "max_price": 0.68,
      "contracts": [
        {
          "contract_id": "contract_001",
          "weight": 0.60
        },
        {
          "contract_id": "contract_002",
          "weight": 0.40
        }
      ]
    }
  ]
}

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
The roll window is defined by:
  • roll_start = contract end date - roll_lead_days
  • roll_end = contract end date
Weight formula during roll:
weight = (timestamp - roll_start) / (roll_end - roll_start)