Get Historical Prices
Updated
Retrieves historical price data for specified feeds, returning high and low prices over a given time period.
Endpoint
GET /prices/queryHistoryCopy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
Base URL: https://oracle.chaoslabs.co
Authentication
Requires an API key in the Authorization header.
Authorization: <YOUR_API_KEY>Copy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
feedIds | string | Yes | Comma-separated list of feed IDs |
minutes | integer | Yes | Number 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>"Copy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
Response
{
"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
}
}
}Copy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
Response Fields
The response is a mapping of feed IDs to objects containing high and low price data:
| Field | Type | Description |
|---|---|---|
feedId | string | Feed identifier |
price | integer | Price value |
ts | integer | Timestamp (seconds since epoch) |
expo | integer | Exponent for price scaling |
signature | string | Signature for the price data |
recoveryId | integer | Recovery ID for the signature |
Errors
| Status | Description |
|---|---|
| 401 | Unauthorized - invalid or missing API key |
Was this helpful?