Skip to content

Commit

Permalink
benzinga alias
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone committed May 18, 2024
1 parent 177a262 commit d7c73f3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
14 changes: 7 additions & 7 deletions openbb_platform/openbb/assets/reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/equity.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def screener(
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)
Expand Down
13 changes: 8 additions & 5 deletions openbb_platform/openbb/package/equity_estimates.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,11 @@ def price_target(
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)
Expand Down Expand Up @@ -955,9 +955,12 @@ def price_target(
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"]},
},
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -60,31 +73,26 @@ 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,
description="Records last Updated Unix timestamp (UTC)."
+ " 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[
Expand All @@ -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,
Expand Down

0 comments on commit d7c73f3

Please sign in to comment.