summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanglewood <85772166+deeleeramone@users.noreply.github.com>2024-05-17 18:09:41 -0700
committerDanglewood <85772166+deeleeramone@users.noreply.github.com>2024-05-17 18:09:41 -0700
commitd7c73f3d827657f5d737008498254124b7e65458 (patch)
treeb99e39d4b70b55704655e5365226f05452784d1d
parent177a262fd6354faddf581a28154b33fa5b083d3d (diff)
benzinga alias
-rw-r--r--openbb_platform/openbb/assets/reference.json14
-rw-r--r--openbb_platform/openbb/package/equity.py2
-rw-r--r--openbb_platform/openbb/package/equity_estimates.py13
-rw-r--r--openbb_platform/providers/benzinga/openbb_benzinga/models/price_target.py23
4 files changed, 30 insertions, 22 deletions
diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json
index 0c7ed54c228..b5b7e6b4529 100644
--- a/openbb_platform/openbb/assets/reference.json
+++ b/openbb_platform/openbb/assets/reference.json
@@ -5794,24 +5794,24 @@
},
{
"name": "analyst_ids",
- "type": "Union[List[str], str]",
- "description": "Comma-separated list of analyst (person) IDs. Omitting will bring back all available analysts.",
+ "type": "Union[Union[List[str], str], List[Union[List[str], str]]]",
+ "description": "Comma-separated list of analyst (person) IDs. Omitting will bring back all available analysts. Multiple items allowed for provider(s): benzinga.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "firm_ids",
- "type": "Union[List[str], str]",
- "description": "Comma-separated list of firm IDs.",
+ "type": "Union[Union[List[str], str], List[Union[List[str], str]]]",
+ "description": "Comma-separated list of firm IDs. Multiple items allowed for provider(s): benzinga.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "fields",
- "type": "Union[List[str], str]",
- "description": "Comma-separated list of fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields.",
+ "type": "Union[Union[List[str], str], List[Union[List[str], str]]]",
+ "description": "Comma-separated list of fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields. Multiple items allowed for provider(s): benzinga.",
"default": null,
"optional": true,
"choices": null
@@ -22325,7 +22325,7 @@
},
{
"name": "sector",
- "type": "Literal['Consumer Cyclical', 'Energy', 'Technology', 'Industrials', 'Financial Services', 'Basic Materials', 'Communication Services', 'Consumer Defensive', 'Healthcare', 'Real Estate', 'Utilities', 'Industrial Goods', 'Financial', 'Services', 'Conglomerates']",
+ "type": "Literal['consumer_cyclical', 'energy', 'technology', 'industrials', 'financial_services', 'basic_materials', 'communication_services', 'consumer_defensive', 'healthcare', 'real_estate', 'utilities', 'industrial_goods', 'financial', 'services', 'conglomerates']",
"description": "Filter by sector.",
"default": null,
"optional": true,
diff --git a/openbb_platform/openbb/package/equity.py b/openbb_platform/openbb/package/equity.py
index c67112ac8a1..922618dae0a 100644
--- a/openbb_platform/openbb/package/equity.py
+++ b/openbb_platform/openbb/package/equity.py
@@ -491,7 +491,7 @@ class ROUTER_equity(Container):
If true, returns only ETFs. (provider: fmp)
is_active : Optional[bool]
If false, returns only inactive tickers. (provider: fmp)
- sector : Optional[Literal['Consumer Cyclical', 'Energy', 'Technology', 'Industrials', 'Financial Services', 'Basic Materials', 'Communication Services', 'Consumer Defensive', 'Healthcare', 'Real Estate', 'Utilities', 'Industrial Goods', 'Financial', 'Services', 'Conglomerates']]
+ sector : Optional[Literal['consumer_cyclical', 'energy', 'technology', 'industrials', 'financial_services', 'basic_materials', 'communication_services', 'consumer_defensive', 'healthcare', 'real_estate', 'utilities', 'industrial_goods', 'financial', 'services', 'conglomerates']]
Filter by sector. (provider: fmp)
industry : Optional[str]
Filter by industry. (provider: fmp)
diff --git a/openbb_platform/openbb/package/equity_estimates.py b/openbb_platform/openbb/package/equity_estimates.py
index efa40206a14..b93d171b6a1 100644
--- a/openbb_platform/openbb/package/equity_estimates.py
+++ b/openbb_platform/openbb/package/equity_estimates.py
@@ -849,11 +849,11 @@ class ROUTER_equity_estimates(Container):
action : Optional[Literal['downgrades', 'maintains', 'reinstates', 'reiterates', 'upgrades', 'assumes', 'initiates', 'terminates', 'removes', 'suspends', 'firm_dissolved']]
Filter by a specific action_company. (provider: benzinga)
analyst_ids : Optional[Union[List[str], str]]
- Comma-separated list of analyst (person) IDs. Omitting will bring back all available analysts. (provider: benzinga)
+ Comma-separated list of analyst (person) IDs. Omitting will bring back all available analysts. Multiple comma separated items allowed. (provider: benzinga)
firm_ids : Optional[Union[List[str], str]]
- Comma-separated list of firm IDs. (provider: benzinga)
+ Comma-separated list of firm IDs. Multiple comma separated items allowed. (provider: benzinga)
fields : Optional[Union[List[str], str]]
- Comma-separated list of fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields. (provider: benzinga)
+ Comma-separated list of fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields. Multiple comma separated items allowed. (provider: benzinga)
with_grade : bool
Include upgrades and downgrades in the response. (provider: fmp)
@@ -955,9 +955,12 @@ class ROUTER_equity_estimates(Container):
extra_params=kwargs,
info={
"symbol": {
- "benzinga": {"multiple_items_allowed": True},
+ "benzinga": ["multiple_items_allowed"],
"fmp": {"multiple_items_allowed": True},
- }
+ },
+ "analyst_ids": {"benzinga": ["multiple_items_allowed"]},
+ "firm_ids": {"benzinga": ["multiple_items_allowed"]},
+ "fields": {"benzinga": ["multiple_items_allowed"]},
},
)
)
diff --git a/openbb_platform/providers/benzinga/openbb_benzinga/models/price_target.py b/openbb_platform/providers/benzinga/openbb_benzinga/models/price_target.py
index 49666ac18c5..6dea39fb96f 100644
--- a/openbb_platform/providers/benzinga/openbb_benzinga/models/price_target.py
+++ b/openbb_platform/providers/benzinga/openbb_benzinga/models/price_target.py
@@ -48,8 +48,21 @@ class BenzingaPriceTargetQueryParams(PriceTargetQueryParams):
__alias_dict__ = {
"limit": "pagesize",
"symbol": "parameters[tickers]",
+ "date": "parameters[date]",
+ "start_date": "parameters[date_from]",
+ "end_date": "parameters[date_to]",
+ "updated": "parameters[updated]",
+ "importance": "parameters[importance]",
+ "action": "parameters[action]",
+ "analyst_ids": "parameters[analyst_id]",
+ "firm_ids": "parameters[firm_id]",
+ }
+ __json_schema_extra__ = {
+ "symbol": ["multiple_items_allowed"],
+ "analyst_ids": ["multiple_items_allowed"],
+ "firm_ids": ["multiple_items_allowed"],
+ "fields": ["multiple_items_allowed"],
}
- __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}}
page: Optional[int] = Field(
default=0,
@@ -60,17 +73,14 @@ class BenzingaPriceTargetQueryParams(PriceTargetQueryParams):
date: Optional[dateType] = Field(
default=None,
description="Date for calendar data, shorthand for date_from and date_to.",
- alias="parameters[date]",
)
start_date: Optional[dateType] = Field(
default=None,
description=QUERY_DESCRIPTIONS.get("start_date", ""),
- alias="parameters[date_from]",
)
end_date: Optional[dateType] = Field(
default=None,
description=QUERY_DESCRIPTIONS.get("end_date", ""),
- alias="parameters[date_to]",
)
updated: Optional[Union[dateType, int]] = Field(
default=None,
@@ -78,13 +88,11 @@ class BenzingaPriceTargetQueryParams(PriceTargetQueryParams):
+ " This will force the sort order to be Greater Than or Equal to the timestamp indicated."
+ " The date can be a date string or a Unix timestamp."
+ " The date string must be in the format of YYYY-MM-DD.",
- alias="parameters[updated]",
)
importance: Optional[int] = Field(
default=None,
description="Importance level to filter by."
+ " Uses Greater Than or Equal To the importance indicated",
- alias="parameters[importance]",
)
action: Optional[
Literal[
@@ -103,18 +111,15 @@ class BenzingaPriceTargetQueryParams(PriceTargetQueryParams):
] = Field(
default=None,
description="Filter by a specific action_company.",
- alias="parameters[action]",
)
analyst_ids: Optional[Union[List[str], str]] = Field(
default=None,
description="Comma-separated list of analyst (person) IDs."
+ " Omitting will bring back all available analysts.",
- alias="parameters[analyst_id]",
)
firm_ids: Optional[Union[List[str], str]] = Field(
default=None,
description="Comma-separated list of firm IDs.",
- alias="parameters[firm_id]",
)
fields: Optional[Union[List[str], str]] = Field(
default=None,