Skip to content

v5.1.0

Choose a tag to compare

@zigazajc007 zigazajc007 released this 04 Jan 15:54
· 15 commits to main since this release

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:

  1. Fetches asset prices in USD from ClickHouse
  2. Retrieves historical exchange rates for the target currency from the same time periods
  3. Applies the matching historical conversion rate to each data point
  4. Falls back to closest available rate or current rate if no exact match exists