GET /prices/
Get the current price or price at a specific timestamp for an asset. Supports linear interpolation between data points.Path Parameters
Asset symbol. Supported values:
ETH/ETHEREUM/WETHBTC/BITCOIN/WBTCUNI/UNISWAPAAVESTETH/WSTETH
Query Parameters
Unix timestamp in seconds. If not provided, returns the current price (based on latest available data).
Response
The asset symbol
The asset price in USD (close price, linearly interpolated if needed)
The timestamp for which the price was retrieved
Example Request
Example Response
GET /prices//historical
Get OHLC (Open, High, Low, Close) historical price data for an asset within a time range.Path Parameters
Asset symbol. See supported values in GET /prices/
Query Parameters
Start timestamp in Unix epoch seconds
End timestamp in Unix epoch seconds (must be >= start)
Response
The asset symbol
Start timestamp of the range
End timestamp of the range
Example Request
Example Response
GET /prices/assets
List all available assets that have price data available.Response
Array of asset symbols (strings)
Example Request
Example Response
Data Source
Price data is loaded from CSV files in thedata/prices/ directory. Files follow the naming convention {asset}_consolidated.csv with the following format:
Notes
- Timestamps can be provided in seconds or milliseconds (automatically normalized)
- Price interpolation is linear between data points
- If a timestamp is before the first data point, the first available price is returned
- If a timestamp is after the last data point, the last available price is returned
- Historical data is cached in memory for performance