summaryrefslogtreecommitdiffstats
path: root/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py')
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py
index e54de3b4fa0..11b4aa780ed 100644
--- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py
+++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py
@@ -107,4 +107,7 @@ class FMPCurrencyHistoricalFetcher(
and d.get("change") != 0
and d.get("changeOverTime") != 0
]
- return [FMPCurrencyHistoricalData.model_validate(d) for d in data]
+ return [
+ FMPCurrencyHistoricalData.model_validate(d)
+ for d in sorted(data, key=lambda x: x["date"], reverse=False)
+ ]