summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjoaquim <h.joaquim@campus.fct.unl.pt>2024-02-21 13:37:36 +0000
committerhjoaquim <h.joaquim@campus.fct.unl.pt>2024-02-21 13:37:36 +0000
commit05f2c968a67d0ccf4fa721b89279ba97b16a6acf (patch)
tree2a19b95dff817cdafe2027e99996a65b831432c7
parentcc8625c70050a866801d7b4c93caf36a832e15ae (diff)
volume as optional field
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/market_historical.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/market_historical.py b/openbb_platform/core/openbb_core/provider/standard_models/market_historical.py
index ebe02a4c4ce..18b61aaed7c 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/market_historical.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/market_historical.py
@@ -45,7 +45,9 @@ class MarketHistoricalData(Data):
high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", ""))
low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", ""))
close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", ""))
- volume: float = Field(description=DATA_DESCRIPTIONS.get("volume", ""))
+ volume: Optional[float] = Field(
+ description=DATA_DESCRIPTIONS.get("volume", ""), default=None
+ )
@field_validator("date", mode="before", check_fields=False)
@classmethod