diff options
author | Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> | 2024-01-10 12:55:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 11:55:47 +0000 |
commit | a5396ac961b848874ccc0a1c5ebf565c0e4e99a6 (patch) | |
tree | 4c8a8dc74326c557854a0ca2e62939221238c3cc | |
parent | cf9536d8697bd778191aab07967864074acc8a2f (diff) |
Fix vwap FMP error (#5936)
* Fix vwap FMP error
* Linting
* Painlint
-rw-r--r-- | openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py | 8 |
1 files changed, 8 insertions, 0 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 dbdd905f623..3367258558e 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -100,4 +100,12 @@ class FMPCurrencyHistoricalFetcher( query: FMPCurrencyHistoricalQueryParams, data: List[Dict], **kwargs: Any ) -> List[FMPCurrencyHistoricalData]: """Return the transformed data.""" + # pylint: disable=unused-argument + data = [ + d + for d in data + if d.get("vwap") != 0 + and d.get("change") != 0 + and d.get("changeOverTime") != 0 + ] return [FMPCurrencyHistoricalData.model_validate(d) for d in data] |