mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
rename extra dict
This commit is contained in:
@@ -26,7 +26,7 @@ class QueryParams(BaseModel):
|
||||
"""
|
||||
|
||||
__alias_dict__: Dict[str, str] = {}
|
||||
__openbb_extra__: Dict[str, Any] = {}
|
||||
__json_schema_extra__: Dict[str, Any] = {}
|
||||
|
||||
def __repr__(self):
|
||||
"""Return the string representation of the QueryParams object."""
|
||||
|
||||
@@ -113,7 +113,7 @@ class RegistryMap:
|
||||
extra_query,
|
||||
):
|
||||
model: BaseModel = RegistryMap._get_model(fetcher, type_)
|
||||
for f, props in getattr(model, "__openbb_extra__", {}).items():
|
||||
for f, props in getattr(model, "__json_schema_extra__", {}).items():
|
||||
for p in props:
|
||||
if f in standard_query["fields"]:
|
||||
model_field = standard_query["fields"][f]
|
||||
|
||||
@@ -35,7 +35,7 @@ class AVEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
Source: https://www.alphavantage.co/documentation/#time-series-data
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Literal["1m", "5m", "15m", "30m", "60m", "1d", "1W", "1M"] = Field(
|
||||
default="1d",
|
||||
|
||||
@@ -30,7 +30,7 @@ class CboeEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
Source: https://www.cboe.com/
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Literal["1m", "1d"] = Field(
|
||||
default="1d",
|
||||
|
||||
@@ -24,7 +24,7 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
"""
|
||||
|
||||
__alias_dict__ = {"start_date": "from", "end_date": "to"}
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
timeseries: Optional[NonNegativeInt] = Field(
|
||||
default=None, description="Number of days to look back."
|
||||
|
||||
@@ -26,7 +26,7 @@ class FMPEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
"""
|
||||
|
||||
__alias_dict__ = {"start_date": "from", "end_date": "to"}
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
limit: Optional[NonNegativeInt] = Field(
|
||||
default=None,
|
||||
|
||||
@@ -36,7 +36,7 @@ class PolygonCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
Source: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: str = Field(
|
||||
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")
|
||||
|
||||
@@ -36,7 +36,7 @@ class PolygonEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
Source: https://polygon.io/docs/stocks/getting-started
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: str = Field(
|
||||
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")
|
||||
|
||||
@@ -24,7 +24,7 @@ class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
"start_date": "startDate",
|
||||
"end_date": "endDate",
|
||||
}
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Literal["1d", "1W", "1M", "1Y"] = Field(
|
||||
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")
|
||||
|
||||
@@ -26,7 +26,7 @@ class YFinanceCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
Source: https://finance.yahoo.com/crypto/
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Optional[INTERVALS] = Field(default="1d", description="Data granularity.")
|
||||
period: Optional[PERIODS] = Field(
|
||||
|
||||
@@ -26,7 +26,7 @@ class YFinanceEquityHistoricalQueryParams(EquityHistoricalQueryParams):
|
||||
Source: https://finance.yahoo.com/
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Optional[
|
||||
Literal[
|
||||
|
||||
Reference in New Issue
Block a user