From d61c8b3f7eb2fbc95fef26d9ca5c7ec2972d71ad Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:07:59 +0100 Subject: [PATCH] Validate currency --- .../eod-historical-data/eod-historical-data.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts index 24607ab4d..649b0c354 100644 --- a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts +++ b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts @@ -277,8 +277,9 @@ export class EodHistoricalDataService implements DataProviderInterface { return { items: searchResult - .filter(({ symbol }) => { - return !symbol.endsWith('.FOREX'); + .filter(({ currency, symbol }) => { + // Remove 'NA' currency and exchange rates + return currency?.length === 3 && !symbol.endsWith('.FOREX'); }) .map( ({