Get Historical Prices

Updated

Retrieves historical price data for specified feeds, returning high and low prices over a given time period.

Endpoint

GET /prices/queryHistory

Base URL: https://oracle.chaoslabs.co

Authentication

Requires an API key in the Authorization header.

Authorization: <YOUR_API_KEY>

Parameters

ParameterTypeRequiredDescription
feedIdsstringYesComma-separated list of feed IDs
minutesintegerYesNumber of minutes of historical data to retrieve

Example Request

curl -X GET "https://oracle.chaoslabs.co/prices/queryHistory?feedIds=BTCUSD&minutes=5"   -H "Authorization: <YOUR_API_KEY>"

Response

json
{
  "BTCUSD": {
    "high": {
      "feedId": "BTCUSD",
      "price": 11830872000000,
      "ts": 1753354105,
      "expo": -8,
      "signature": "9cd54324e961def230a0...",
      "recoveryId": 1
    },
    "low": {
      "feedId": "BTCUSD",
      "price": 11823675000000,
      "ts": 1753354047,
      "expo": -8,
      "signature": "29700e10406d1b895624...",
      "recoveryId": 0
    }
  }
}

Response Fields

The response is a mapping of feed IDs to objects containing high and low price data:

FieldTypeDescription
feedIdstringFeed identifier
priceintegerPrice value
tsintegerTimestamp (seconds since epoch)
expointegerExponent for price scaling
signaturestringSignature for the price data
recoveryIdintegerRecovery ID for the signature

Errors

StatusDescription
401Unauthorized - invalid or missing API key
Was this helpful?