v5.1.0
Added:
- Historical currency conversion for price data using time-matched exchange rates
- 9 new API endpoints for historical data with currency conversion:
GET /v1/metals/history/:symbol/currency/:base- Metal history in currency (raw, last 24h)GET /v1/metals/history/:symbol/currency/:base/hourly- Metal history in currency (hourly, last 90d)GET /v1/metals/history/:symbol/currency/:base/daily- Metal history in currency (daily, all time)GET /v1/crypto/history/:symbol/currency/:base- Crypto history in currency (raw, last 24h)GET /v1/crypto/history/:symbol/currency/:base/hourly- Crypto history in currency (hourly, last 90d)GET /v1/crypto/history/:symbol/currency/:base/daily- Crypto history in currency (daily, all time)GET /v1/stocks/history/:symbol/currency/:base- Stock history in currency (raw, last 24h)GET /v1/stocks/history/:symbol/currency/:base/hourly- Stock history in currency (hourly, last 90d)GET /v1/stocks/history/:symbol/currency/:base/daily- Stock history in currency (daily, all time)
How it works:
- Fetches asset prices in USD from ClickHouse
- Retrieves historical exchange rates for the target currency from the same time periods
- Applies the matching historical conversion rate to each data point
- Falls back to closest available rate or current rate if no exact match exists