From a2886057cfef3dba01f0bd05fa3be5ed48c6462c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 18 Jul 2026 14:13:19 +0200 Subject: [PATCH] Fix historical date range filter --- .../data-provider/alpha-vantage/alpha-vantage.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/services/data-provider/alpha-vantage/alpha-vantage.service.ts b/apps/api/src/services/data-provider/alpha-vantage/alpha-vantage.service.ts index 40b45a115..bc2332381 100644 --- a/apps/api/src/services/data-provider/alpha-vantage/alpha-vantage.service.ts +++ b/apps/api/src/services/data-provider/alpha-vantage/alpha-vantage.service.ts @@ -92,8 +92,8 @@ export class AlphaVantageService historicalData['Time Series (Digital Currency Daily)'] ).sort()) { if ( - isAfter(from, parse(key, DATE_FORMAT, new Date())) && - isBefore(to, parse(key, DATE_FORMAT, new Date())) + isBefore(from, parse(key, DATE_FORMAT, new Date())) && + isAfter(to, parse(key, DATE_FORMAT, new Date())) ) { response[symbol][key] = { marketPrice: parseFloat(timeSeries['4a. close (USD)'])