mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 06:51:38 +00:00
Merge
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
|
||||
|
||||
import datetime
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing import List, Literal, Union
|
||||
|
||||
import typing_extensions
|
||||
from annotated_types import Ge
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
@@ -10,7 +11,6 @@ from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_inputs
|
||||
from openbb_provider.abstract.data import Data
|
||||
from pydantic import validate_call
|
||||
from typing_extensions import Annotated
|
||||
|
||||
|
||||
class ROUTER_stocks(Container):
|
||||
@@ -44,11 +44,11 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def info(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
symbol: typing_extensions.Annotated[
|
||||
Union[str, List[str]],
|
||||
OpenBBCustomParameter(description="Symbol to get data for."),
|
||||
],
|
||||
provider: Optional[Literal["cboe"]] = None,
|
||||
provider: Union[Literal["cboe"], None] = None,
|
||||
**kwargs
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Get general price and performance metrics of a stock.
|
||||
@@ -57,7 +57,7 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
symbol : str
|
||||
Symbol to get data for.
|
||||
provider : Optional[Literal['cboe']]
|
||||
provider : Union[Literal['cboe'], None]
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'cboe' if there is
|
||||
no default.
|
||||
@@ -65,9 +65,9 @@ class ROUTER_stocks(Container):
|
||||
Returns
|
||||
-------
|
||||
OBBject
|
||||
results : List[StockInfo]
|
||||
results : Union[List[StockInfo]]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['cboe']]
|
||||
provider : Union[Literal['cboe'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -82,63 +82,63 @@ class ROUTER_stocks(Container):
|
||||
Symbol to get data for.
|
||||
name : str
|
||||
Name associated with the ticker symbol.
|
||||
price : Optional[float]
|
||||
price : Optional[Union[float]]
|
||||
Last transaction price.
|
||||
open : Optional[float]
|
||||
open : Optional[Union[float]]
|
||||
Opening price of the stock.
|
||||
high : Optional[float]
|
||||
high : Optional[Union[float]]
|
||||
High price of the current trading day.
|
||||
low : Optional[float]
|
||||
low : Optional[Union[float]]
|
||||
Low price of the current trading day.
|
||||
close : Optional[float]
|
||||
close : Optional[Union[float]]
|
||||
Closing price of the most recent trading day.
|
||||
change : Optional[float]
|
||||
change : Optional[Union[float]]
|
||||
Change in price over the current trading period.
|
||||
change_percent : Optional[float]
|
||||
change_percent : Optional[Union[float]]
|
||||
Percent change in price over the current trading period.
|
||||
prev_close : Optional[float]
|
||||
prev_close : Optional[Union[float]]
|
||||
Previous closing price.
|
||||
type : Optional[str]
|
||||
type : Optional[Union[str]]
|
||||
Type of asset. (provider: cboe)
|
||||
exchange_id : Optional[int]
|
||||
exchange_id : Optional[Union[int]]
|
||||
The Exchange ID number. (provider: cboe)
|
||||
tick : Optional[str]
|
||||
tick : Optional[Union[str]]
|
||||
Whether the last sale was an up or down tick. (provider: cboe)
|
||||
bid : Optional[float]
|
||||
bid : Optional[Union[float]]
|
||||
Current bid price. (provider: cboe)
|
||||
bid_size : Optional[float]
|
||||
bid_size : Optional[Union[float]]
|
||||
Bid lot size. (provider: cboe)
|
||||
ask : Optional[float]
|
||||
ask : Optional[Union[float]]
|
||||
Current ask price. (provider: cboe)
|
||||
ask_size : Optional[float]
|
||||
ask_size : Optional[Union[float]]
|
||||
Ask lot size. (provider: cboe)
|
||||
volume : Optional[float]
|
||||
volume : Optional[Union[float]]
|
||||
Stock volume for the current trading day. (provider: cboe)
|
||||
iv30 : Optional[float]
|
||||
iv30 : Optional[Union[float]]
|
||||
The 30-day implied volatility of the stock. (provider: cboe)
|
||||
iv30_change : Optional[float]
|
||||
iv30_change : Optional[Union[float]]
|
||||
Change in 30-day implied volatility of the stock. (provider: cboe)
|
||||
last_trade_timestamp : Optional[datetime]
|
||||
last_trade_timestamp : Optional[Union[datetime]]
|
||||
Last trade timestamp for the stock. (provider: cboe)
|
||||
iv30_annual_high : Optional[float]
|
||||
iv30_annual_high : Optional[Union[float]]
|
||||
The 1-year high of implied volatility. (provider: cboe)
|
||||
hv30_annual_high : Optional[float]
|
||||
hv30_annual_high : Optional[Union[float]]
|
||||
The 1-year high of realized volatility. (provider: cboe)
|
||||
iv30_annual_low : Optional[float]
|
||||
iv30_annual_low : Optional[Union[float]]
|
||||
The 1-year low of implied volatility. (provider: cboe)
|
||||
hv30_annual_low : Optional[float]
|
||||
hv30_annual_low : Optional[Union[float]]
|
||||
The 1-year low of realized volatility. (provider: cboe)
|
||||
iv60_annual_high : Optional[float]
|
||||
iv60_annual_high : Optional[Union[float]]
|
||||
The 60-day high of implied volatility. (provider: cboe)
|
||||
hv60_annual_high : Optional[float]
|
||||
hv60_annual_high : Optional[Union[float]]
|
||||
The 60-day high of realized volatility. (provider: cboe)
|
||||
iv60_annual_low : Optional[float]
|
||||
iv60_annual_low : Optional[Union[float]]
|
||||
The 60-day low of implied volatility. (provider: cboe)
|
||||
hv60_annual_low : Optional[float]
|
||||
hv60_annual_low : Optional[Union[float]]
|
||||
The 60-day low of realized volatility. (provider: cboe)
|
||||
iv90_annual_high : Optional[float]
|
||||
iv90_annual_high : Optional[Union[float]]
|
||||
The 90-day high of implied volatility. (provider: cboe)
|
||||
hv90_annual_high : Optional[float]
|
||||
hv90_annual_high : Optional[Union[float]]
|
||||
The 90-day high of realized volatility. (provider: cboe)""" # noqa: E501
|
||||
|
||||
inputs = filter_inputs(
|
||||
@@ -159,25 +159,26 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def load(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
symbol: typing_extensions.Annotated[
|
||||
Union[str, List[str]],
|
||||
OpenBBCustomParameter(description="Symbol to get data for."),
|
||||
],
|
||||
start_date: Annotated[
|
||||
start_date: typing_extensions.Annotated[
|
||||
Union[datetime.date, None, str],
|
||||
OpenBBCustomParameter(
|
||||
description="Start date of the data, in YYYY-MM-DD format."
|
||||
),
|
||||
] = None,
|
||||
end_date: Annotated[
|
||||
end_date: typing_extensions.Annotated[
|
||||
Union[datetime.date, None, str],
|
||||
OpenBBCustomParameter(
|
||||
description="End date of the data, in YYYY-MM-DD format."
|
||||
),
|
||||
] = None,
|
||||
chart: bool = False,
|
||||
provider: Optional[
|
||||
Literal["alpha_vantage", "cboe", "fmp", "intrinio", "polygon", "yfinance"]
|
||||
provider: Union[
|
||||
Literal["alpha_vantage", "cboe", "fmp", "intrinio", "polygon", "yfinance"],
|
||||
None,
|
||||
] = None,
|
||||
**kwargs
|
||||
) -> OBBject[List[Data]]:
|
||||
@@ -187,13 +188,13 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
symbol : str
|
||||
Symbol to get data for.
|
||||
start_date : Optional[datetime.date]
|
||||
start_date : Union[datetime.date, None]
|
||||
Start date of the data, in YYYY-MM-DD format.
|
||||
end_date : Optional[datetime.date]
|
||||
end_date : Union[datetime.date, None]
|
||||
End date of the data, in YYYY-MM-DD format.
|
||||
chart : bool
|
||||
Whether to create a chart or not, by default False.
|
||||
provider : Optional[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'pol...
|
||||
provider : Union[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygo...
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'alpha_vantage' if there is
|
||||
no default.
|
||||
@@ -203,25 +204,25 @@ class ROUTER_stocks(Container):
|
||||
Period of the data to return. (provider: alpha_vantage, yfinance)
|
||||
interval : Optional[Union[Literal['1min', '5min', '15min', '30min', '60min'], Literal['1d', '1m'], Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']]]
|
||||
Data granularity. (provider: alpha_vantage, cboe, fmp, yfinance)
|
||||
adjusted : Optional[bool]
|
||||
adjusted : Optional[Union[bool]]
|
||||
Output time series is adjusted by historical split and dividend events. (provider: alpha_vantage, polygon)
|
||||
extended_hours : Optional[bool]
|
||||
extended_hours : Optional[Union[bool]]
|
||||
Extended trading hours during pre-market and after-hours. (provider: alpha_vantage)
|
||||
month : Optional[str]
|
||||
month : Optional[Union[str]]
|
||||
Query a specific month in history (in YYYY-MM format). (provider: alpha_vantage)
|
||||
outputsize : Optional[Literal['compact', 'full']]
|
||||
outputsize : Optional[Union[Literal['compact', 'full']]]
|
||||
Compact returns only the latest 100 data points in the intraday time series; full returns trailing 30 days of the most recent intraday data if the month parameter (see above) is not specified, or the full intraday data for a specific month in history if the month parameter is specified. (provider: alpha_vantage)
|
||||
timeseries : Optional[Annotated[int, Ge(ge=0)]]
|
||||
timeseries : Optional[Union[typing_extensions.Annotated[int, Ge(ge=0)]]]
|
||||
Number of days to look back. (provider: fmp)
|
||||
timezone : Optional[Literal['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu']]
|
||||
timezone : Optional[Union[Literal['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu']]]
|
||||
Returns trading times in this timezone. (provider: intrinio)
|
||||
source : Optional[Literal['realtime', 'delayed', 'nasdaq_basic']]
|
||||
source : Optional[Union[Literal['realtime', 'delayed', 'nasdaq_basic']]]
|
||||
The source of the data. (provider: intrinio)
|
||||
start_time : Optional[datetime.time]
|
||||
start_time : Optional[Union[datetime.time]]
|
||||
Return intervals starting at the specified time on the `start_date` formatted as 'hh:mm:ss'. (provider: intrinio)
|
||||
end_time : Optional[datetime.time]
|
||||
end_time : Optional[Union[datetime.time]]
|
||||
Return intervals stopping at the specified time on the `end_date` formatted as 'hh:mm:ss'. (provider: intrinio)
|
||||
interval_size : Optional[Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h']]
|
||||
interval_size : Optional[Union[Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h']]]
|
||||
The data time frequency. (provider: intrinio)
|
||||
multiplier : int
|
||||
Multiplier of the timespan. (provider: polygon)
|
||||
@@ -255,9 +256,9 @@ class ROUTER_stocks(Container):
|
||||
Returns
|
||||
-------
|
||||
OBBject
|
||||
results : List[StockHistorical]
|
||||
results : Union[List[StockHistorical]]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'yfinance']]
|
||||
provider : Union[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'yfinance'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -280,37 +281,37 @@ class ROUTER_stocks(Container):
|
||||
The close price of the symbol.
|
||||
volume : Union[float, int]
|
||||
The volume of the symbol.
|
||||
vwap : Optional[Annotated[float, Gt(gt=0)]]
|
||||
vwap : Optional[Union[typing_extensions.Annotated[float, Gt(gt=0)]]]
|
||||
Volume Weighted Average Price of the symbol.
|
||||
adj_close : Optional[Union[Annotated[float, Gt(gt=0)], float]]
|
||||
adj_close : Optional[Union[typing_extensions.Annotated[float, Gt(gt=0)], float]]
|
||||
The adjusted close price of the symbol. (provider: alpha_vantage, fmp)
|
||||
dividend_amount : Optional[Annotated[float, Ge(ge=0)]]
|
||||
dividend_amount : Optional[Union[typing_extensions.Annotated[float, Ge(ge=0)]]]
|
||||
Dividend amount paid for the corresponding date. (provider: alpha_vantage)
|
||||
split_coefficient : Optional[Annotated[float, Ge(ge=0)]]
|
||||
split_coefficient : Optional[Union[typing_extensions.Annotated[float, Ge(ge=0)]]]
|
||||
Split coefficient for the corresponding date. (provider: alpha_vantage)
|
||||
calls_volume : Optional[float]
|
||||
calls_volume : Optional[Union[float]]
|
||||
Number of calls traded during the most recent trading period. Only valid if interval is 1m. (provider: cboe)
|
||||
puts_volume : Optional[float]
|
||||
puts_volume : Optional[Union[float]]
|
||||
Number of puts traded during the most recent trading period. Only valid if interval is 1m. (provider: cboe)
|
||||
total_options_volume : Optional[float]
|
||||
total_options_volume : Optional[Union[float]]
|
||||
Total number of options traded during the most recent trading period. Only valid if interval is 1m. (provider: cboe)
|
||||
unadjusted_volume : Optional[float]
|
||||
unadjusted_volume : Optional[Union[float]]
|
||||
Unadjusted volume of the symbol. (provider: fmp)
|
||||
change : Optional[float]
|
||||
change : Optional[Union[float]]
|
||||
Change in the price of the symbol from the previous day. (provider: fmp, intrinio)
|
||||
change_percent : Optional[float]
|
||||
change_percent : Optional[Union[float]]
|
||||
Change % in the price of the symbol. (provider: fmp)
|
||||
label : Optional[str]
|
||||
label : Optional[Union[str]]
|
||||
Human readable format of the date. (provider: fmp)
|
||||
change_over_time : Optional[float]
|
||||
change_over_time : Optional[Union[float]]
|
||||
Change % in the price of the symbol over a period of time. (provider: fmp)
|
||||
close_time : Optional[datetime]
|
||||
close_time : Optional[Union[datetime]]
|
||||
The timestamp that represents the end of the interval span. (provider: intrinio)
|
||||
interval : Optional[str]
|
||||
interval : Optional[Union[str]]
|
||||
The data time frequency. (provider: intrinio)
|
||||
average : Optional[float]
|
||||
average : Optional[Union[float]]
|
||||
Average trade price of an individual stock during the interval. (provider: intrinio)
|
||||
transactions : Optional[Annotated[int, Gt(gt=0)]]
|
||||
transactions : Optional[Union[typing_extensions.Annotated[int, Gt(gt=0)]]]
|
||||
Number of transactions for the symbol in the time period. (provider: polygon)
|
||||
""" # noqa: E501
|
||||
|
||||
@@ -335,16 +336,16 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def multiples(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
symbol: typing_extensions.Annotated[
|
||||
Union[str, List[str]],
|
||||
OpenBBCustomParameter(description="Symbol to get data for."),
|
||||
],
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
limit: typing_extensions.Annotated[
|
||||
Union[int, None],
|
||||
OpenBBCustomParameter(description="The number of data entries to return."),
|
||||
] = 100,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
provider: Union[Literal["fmp"], None] = None,
|
||||
**kwargs
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Get valuation multiples for a stock ticker.
|
||||
@@ -353,11 +354,11 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
symbol : str
|
||||
Symbol to get data for.
|
||||
limit : Optional[int]
|
||||
limit : Union[int, None]
|
||||
The number of data entries to return.
|
||||
chart : bool
|
||||
Whether to create a chart or not, by default False.
|
||||
provider : Optional[Literal['fmp']]
|
||||
provider : Union[Literal['fmp'], None]
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'fmp' if there is
|
||||
no default.
|
||||
@@ -365,9 +366,9 @@ class ROUTER_stocks(Container):
|
||||
Returns
|
||||
-------
|
||||
OBBject
|
||||
results : List[StockMultiples]
|
||||
results : Union[List[StockMultiples]]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['fmp']]
|
||||
provider : Union[Literal['fmp'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -378,125 +379,125 @@ class ROUTER_stocks(Container):
|
||||
|
||||
StockMultiples
|
||||
--------------
|
||||
revenue_per_share_ttm : Optional[float]
|
||||
revenue_per_share_ttm : Optional[Union[float]]
|
||||
Revenue per share calculated as trailing twelve months.
|
||||
net_income_per_share_ttm : Optional[float]
|
||||
net_income_per_share_ttm : Optional[Union[float]]
|
||||
Net income per share calculated as trailing twelve months.
|
||||
operating_cash_flow_per_share_ttm : Optional[float]
|
||||
operating_cash_flow_per_share_ttm : Optional[Union[float]]
|
||||
Operating cash flow per share calculated as trailing twelve months.
|
||||
free_cash_flow_per_share_ttm : Optional[float]
|
||||
free_cash_flow_per_share_ttm : Optional[Union[float]]
|
||||
Free cash flow per share calculated as trailing twelve months.
|
||||
cash_per_share_ttm : Optional[float]
|
||||
cash_per_share_ttm : Optional[Union[float]]
|
||||
Cash per share calculated as trailing twelve months.
|
||||
book_value_per_share_ttm : Optional[float]
|
||||
book_value_per_share_ttm : Optional[Union[float]]
|
||||
Book value per share calculated as trailing twelve months.
|
||||
tangible_book_value_per_share_ttm : Optional[float]
|
||||
tangible_book_value_per_share_ttm : Optional[Union[float]]
|
||||
Tangible book value per share calculated as trailing twelve months.
|
||||
shareholders_equity_per_share_ttm : Optional[float]
|
||||
shareholders_equity_per_share_ttm : Optional[Union[float]]
|
||||
Shareholders equity per share calculated as trailing twelve months.
|
||||
interest_debt_per_share_ttm : Optional[float]
|
||||
interest_debt_per_share_ttm : Optional[Union[float]]
|
||||
Interest debt per share calculated as trailing twelve months.
|
||||
market_cap_ttm : Optional[float]
|
||||
market_cap_ttm : Optional[Union[float]]
|
||||
Market capitalization calculated as trailing twelve months.
|
||||
enterprise_value_ttm : Optional[float]
|
||||
enterprise_value_ttm : Optional[Union[float]]
|
||||
Enterprise value calculated as trailing twelve months.
|
||||
pe_ratio_ttm : Optional[float]
|
||||
pe_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-earnings ratio (P/E ratio) calculated as trailing twelve months.
|
||||
price_to_sales_ratio_ttm : Optional[float]
|
||||
price_to_sales_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-sales ratio calculated as trailing twelve months.
|
||||
pocf_ratio_ttm : Optional[float]
|
||||
pocf_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-operating cash flow ratio calculated as trailing twelve months.
|
||||
pfcf_ratio_ttm : Optional[float]
|
||||
pfcf_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-free cash flow ratio calculated as trailing twelve months.
|
||||
pb_ratio_ttm : Optional[float]
|
||||
pb_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-book ratio calculated as trailing twelve months.
|
||||
ptb_ratio_ttm : Optional[float]
|
||||
ptb_ratio_ttm : Optional[Union[float]]
|
||||
Price-to-tangible book ratio calculated as trailing twelve months.
|
||||
ev_to_sales_ttm : Optional[float]
|
||||
ev_to_sales_ttm : Optional[Union[float]]
|
||||
Enterprise value-to-sales ratio calculated as trailing twelve months.
|
||||
enterprise_value_over_ebitda_ttm : Optional[float]
|
||||
enterprise_value_over_ebitda_ttm : Optional[Union[float]]
|
||||
Enterprise value-to-EBITDA ratio calculated as trailing twelve months.
|
||||
ev_to_operating_cash_flow_ttm : Optional[float]
|
||||
ev_to_operating_cash_flow_ttm : Optional[Union[float]]
|
||||
Enterprise value-to-operating cash flow ratio calculated as trailing twelve months.
|
||||
ev_to_free_cash_flow_ttm : Optional[float]
|
||||
ev_to_free_cash_flow_ttm : Optional[Union[float]]
|
||||
Enterprise value-to-free cash flow ratio calculated as trailing twelve months.
|
||||
earnings_yield_ttm : Optional[float]
|
||||
earnings_yield_ttm : Optional[Union[float]]
|
||||
Earnings yield calculated as trailing twelve months.
|
||||
free_cash_flow_yield_ttm : Optional[float]
|
||||
free_cash_flow_yield_ttm : Optional[Union[float]]
|
||||
Free cash flow yield calculated as trailing twelve months.
|
||||
debt_to_equity_ttm : Optional[float]
|
||||
debt_to_equity_ttm : Optional[Union[float]]
|
||||
Debt-to-equity ratio calculated as trailing twelve months.
|
||||
debt_to_assets_ttm : Optional[float]
|
||||
debt_to_assets_ttm : Optional[Union[float]]
|
||||
Debt-to-assets ratio calculated as trailing twelve months.
|
||||
net_debt_to_ebitda_ttm : Optional[float]
|
||||
net_debt_to_ebitda_ttm : Optional[Union[float]]
|
||||
Net debt-to-EBITDA ratio calculated as trailing twelve months.
|
||||
current_ratio_ttm : Optional[float]
|
||||
current_ratio_ttm : Optional[Union[float]]
|
||||
Current ratio calculated as trailing twelve months.
|
||||
interest_coverage_ttm : Optional[float]
|
||||
interest_coverage_ttm : Optional[Union[float]]
|
||||
Interest coverage calculated as trailing twelve months.
|
||||
income_quality_ttm : Optional[float]
|
||||
income_quality_ttm : Optional[Union[float]]
|
||||
Income quality calculated as trailing twelve months.
|
||||
dividend_yield_ttm : Optional[float]
|
||||
dividend_yield_ttm : Optional[Union[float]]
|
||||
Dividend yield calculated as trailing twelve months.
|
||||
dividend_yield_percentage_ttm : Optional[float]
|
||||
dividend_yield_percentage_ttm : Optional[Union[float]]
|
||||
Dividend yield percentage calculated as trailing twelve months.
|
||||
dividend_to_market_cap_ttm : Optional[float]
|
||||
dividend_to_market_cap_ttm : Optional[Union[float]]
|
||||
Dividend to market capitalization ratio calculated as trailing twelve months.
|
||||
dividend_per_share_ttm : Optional[float]
|
||||
dividend_per_share_ttm : Optional[Union[float]]
|
||||
Dividend per share calculated as trailing twelve months.
|
||||
payout_ratio_ttm : Optional[float]
|
||||
payout_ratio_ttm : Optional[Union[float]]
|
||||
Payout ratio calculated as trailing twelve months.
|
||||
sales_general_and_administrative_to_revenue_ttm : Optional[float]
|
||||
sales_general_and_administrative_to_revenue_ttm : Optional[Union[float]]
|
||||
Sales general and administrative expenses-to-revenue ratio calculated as trailing twelve months.
|
||||
research_and_development_to_revenue_ttm : Optional[float]
|
||||
research_and_development_to_revenue_ttm : Optional[Union[float]]
|
||||
Research and development expenses-to-revenue ratio calculated as trailing twelve months.
|
||||
intangibles_to_total_assets_ttm : Optional[float]
|
||||
intangibles_to_total_assets_ttm : Optional[Union[float]]
|
||||
Intangibles-to-total assets ratio calculated as trailing twelve months.
|
||||
capex_to_operating_cash_flow_ttm : Optional[float]
|
||||
capex_to_operating_cash_flow_ttm : Optional[Union[float]]
|
||||
Capital expenditures-to-operating cash flow ratio calculated as trailing twelve months.
|
||||
capex_to_revenue_ttm : Optional[float]
|
||||
capex_to_revenue_ttm : Optional[Union[float]]
|
||||
Capital expenditures-to-revenue ratio calculated as trailing twelve months.
|
||||
capex_to_depreciation_ttm : Optional[float]
|
||||
capex_to_depreciation_ttm : Optional[Union[float]]
|
||||
Capital expenditures-to-depreciation ratio calculated as trailing twelve months.
|
||||
stock_based_compensation_to_revenue_ttm : Optional[float]
|
||||
stock_based_compensation_to_revenue_ttm : Optional[Union[float]]
|
||||
Stock-based compensation-to-revenue ratio calculated as trailing twelve months.
|
||||
graham_number_ttm : Optional[float]
|
||||
graham_number_ttm : Optional[Union[float]]
|
||||
Graham number calculated as trailing twelve months.
|
||||
roic_ttm : Optional[float]
|
||||
roic_ttm : Optional[Union[float]]
|
||||
Return on invested capital calculated as trailing twelve months.
|
||||
return_on_tangible_assets_ttm : Optional[float]
|
||||
return_on_tangible_assets_ttm : Optional[Union[float]]
|
||||
Return on tangible assets calculated as trailing twelve months.
|
||||
graham_net_net_ttm : Optional[float]
|
||||
graham_net_net_ttm : Optional[Union[float]]
|
||||
Graham net-net working capital calculated as trailing twelve months.
|
||||
working_capital_ttm : Optional[float]
|
||||
working_capital_ttm : Optional[Union[float]]
|
||||
Working capital calculated as trailing twelve months.
|
||||
tangible_asset_value_ttm : Optional[float]
|
||||
tangible_asset_value_ttm : Optional[Union[float]]
|
||||
Tangible asset value calculated as trailing twelve months.
|
||||
net_current_asset_value_ttm : Optional[float]
|
||||
net_current_asset_value_ttm : Optional[Union[float]]
|
||||
Net current asset value calculated as trailing twelve months.
|
||||
invested_capital_ttm : Optional[float]
|
||||
invested_capital_ttm : Optional[Union[float]]
|
||||
Invested capital calculated as trailing twelve months.
|
||||
average_receivables_ttm : Optional[float]
|
||||
average_receivables_ttm : Optional[Union[float]]
|
||||
Average receivables calculated as trailing twelve months.
|
||||
average_payables_ttm : Optional[float]
|
||||
average_payables_ttm : Optional[Union[float]]
|
||||
Average payables calculated as trailing twelve months.
|
||||
average_inventory_ttm : Optional[float]
|
||||
average_inventory_ttm : Optional[Union[float]]
|
||||
Average inventory calculated as trailing twelve months.
|
||||
days_sales_outstanding_ttm : Optional[float]
|
||||
days_sales_outstanding_ttm : Optional[Union[float]]
|
||||
Days sales outstanding calculated as trailing twelve months.
|
||||
days_payables_outstanding_ttm : Optional[float]
|
||||
days_payables_outstanding_ttm : Optional[Union[float]]
|
||||
Days payables outstanding calculated as trailing twelve months.
|
||||
days_of_inventory_on_hand_ttm : Optional[float]
|
||||
days_of_inventory_on_hand_ttm : Optional[Union[float]]
|
||||
Days of inventory on hand calculated as trailing twelve months.
|
||||
receivables_turnover_ttm : Optional[float]
|
||||
receivables_turnover_ttm : Optional[Union[float]]
|
||||
Receivables turnover calculated as trailing twelve months.
|
||||
payables_turnover_ttm : Optional[float]
|
||||
payables_turnover_ttm : Optional[Union[float]]
|
||||
Payables turnover calculated as trailing twelve months.
|
||||
inventory_turnover_ttm : Optional[float]
|
||||
inventory_turnover_ttm : Optional[Union[float]]
|
||||
Inventory turnover calculated as trailing twelve months.
|
||||
roe_ttm : Optional[float]
|
||||
roe_ttm : Optional[Union[float]]
|
||||
Return on equity calculated as trailing twelve months.
|
||||
capex_per_share_ttm : Optional[float]
|
||||
capex_per_share_ttm : Optional[Union[float]]
|
||||
Capital expenditures per share calculated as trailing twelve months.""" # noqa: E501
|
||||
|
||||
inputs = filter_inputs(
|
||||
@@ -519,16 +520,16 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def news(
|
||||
self,
|
||||
symbols: Annotated[
|
||||
symbols: typing_extensions.Annotated[
|
||||
str, OpenBBCustomParameter(description="Comma separated list of symbols.")
|
||||
],
|
||||
limit: Annotated[
|
||||
Optional[Annotated[int, Ge(ge=0)]],
|
||||
limit: typing_extensions.Annotated[
|
||||
Union[typing_extensions.Annotated[int, Ge(ge=0)], None],
|
||||
OpenBBCustomParameter(description="Number of results to return per page."),
|
||||
] = 20,
|
||||
chart: bool = False,
|
||||
provider: Optional[
|
||||
Literal["benzinga", "fmp", "intrinio", "polygon", "yfinance"]
|
||||
provider: Union[
|
||||
Literal["benzinga", "fmp", "intrinio", "polygon", "yfinance"], None
|
||||
] = None,
|
||||
**kwargs
|
||||
) -> OBBject[List[Data]]:
|
||||
@@ -538,51 +539,51 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
symbols : str
|
||||
Comma separated list of symbols.
|
||||
limit : Optional[Annotated[int, Ge(ge=0)]]
|
||||
limit : Union[typing_extensions.Annotated[int, Ge(ge=0)], None]
|
||||
Number of results to return per page.
|
||||
chart : bool
|
||||
Whether to create a chart or not, by default False.
|
||||
provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfina...
|
||||
provider : Union[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfinance...
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'benzinga' if there is
|
||||
no default.
|
||||
display : Literal['headline', 'abstract', 'full']
|
||||
Specify headline only (headline), headline + teaser (abstract), or headline + full body (full). (provider: benzinga)
|
||||
date : Optional[str]
|
||||
date : Optional[Union[str]]
|
||||
Date of the news to retrieve. (provider: benzinga)
|
||||
start_date : Optional[str]
|
||||
start_date : Optional[Union[str]]
|
||||
Start date of the news to retrieve. (provider: benzinga)
|
||||
end_date : Optional[str]
|
||||
end_date : Optional[Union[str]]
|
||||
End date of the news to retrieve. (provider: benzinga)
|
||||
updated_since : Optional[int]
|
||||
updated_since : Optional[Union[int]]
|
||||
Number of seconds since the news was updated. (provider: benzinga)
|
||||
published_since : Optional[int]
|
||||
published_since : Optional[Union[int]]
|
||||
Number of seconds since the news was published. (provider: benzinga)
|
||||
sort : Optional[Literal['id', 'created', 'updated']]
|
||||
sort : Optional[Union[Literal['id', 'created', 'updated']]]
|
||||
Key to sort the news by. (provider: benzinga)
|
||||
order : Optional[Literal['asc', 'desc']]
|
||||
order : Optional[Union[Literal['asc', 'desc']]]
|
||||
Order to sort the news by. (provider: benzinga); Sort order of the articles. (provider: polygon)
|
||||
isin : Optional[str]
|
||||
isin : Optional[Union[str]]
|
||||
The ISIN of the news to retrieve. (provider: benzinga)
|
||||
cusip : Optional[str]
|
||||
cusip : Optional[Union[str]]
|
||||
The CUSIP of the news to retrieve. (provider: benzinga)
|
||||
channels : Optional[str]
|
||||
channels : Optional[Union[str]]
|
||||
Channels of the news to retrieve. (provider: benzinga)
|
||||
topics : Optional[str]
|
||||
topics : Optional[Union[str]]
|
||||
Topics of the news to retrieve. (provider: benzinga)
|
||||
authors : Optional[str]
|
||||
authors : Optional[Union[str]]
|
||||
Authors of the news to retrieve. (provider: benzinga)
|
||||
content_types : Optional[str]
|
||||
content_types : Optional[Union[str]]
|
||||
Content types of the news to retrieve. (provider: benzinga)
|
||||
published_utc : Optional[str]
|
||||
published_utc : Optional[Union[str]]
|
||||
Date query to fetch articles. Supports operators <, <=, >, >= (provider: polygon)
|
||||
|
||||
Returns
|
||||
-------
|
||||
OBBject
|
||||
results : List[StockNews]
|
||||
results : Union[List[StockNews]]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfinance']]
|
||||
provider : Union[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfinance'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -597,49 +598,49 @@ class ROUTER_stocks(Container):
|
||||
Published date of the news.
|
||||
title : str
|
||||
Title of the news.
|
||||
image : Optional[str]
|
||||
image : Optional[Union[str]]
|
||||
Image URL of the news.
|
||||
text : Optional[str]
|
||||
text : Optional[Union[str]]
|
||||
Text/body of the news.
|
||||
url : str
|
||||
URL of the news.
|
||||
id : Optional[str]
|
||||
id : Optional[Union[str]]
|
||||
ID of the news. (provider: benzinga); Intrinio ID for the article. (provider: intrinio); Article ID. (provider: polygon)
|
||||
author : Optional[str]
|
||||
author : Optional[Union[str]]
|
||||
Author of the news. (provider: benzinga); Author of the article. (provider: polygon)
|
||||
teaser : Optional[str]
|
||||
teaser : Optional[Union[str]]
|
||||
Teaser of the news. (provider: benzinga)
|
||||
images : Optional[List[Dict[str, str]]]
|
||||
images : Optional[Union[List[Dict[str, str]]]]
|
||||
Images associated with the news. (provider: benzinga)
|
||||
channels : Optional[str]
|
||||
channels : Optional[Union[str]]
|
||||
Channels associated with the news. (provider: benzinga)
|
||||
stocks : Optional[str]
|
||||
stocks : Optional[Union[str]]
|
||||
Stocks associated with the news. (provider: benzinga)
|
||||
tags : Optional[str]
|
||||
tags : Optional[Union[str]]
|
||||
Tags associated with the news. (provider: benzinga)
|
||||
updated : Optional[datetime]
|
||||
updated : Optional[Union[datetime]]
|
||||
None
|
||||
symbol : Optional[str]
|
||||
symbol : Optional[Union[str]]
|
||||
Ticker of the fetched news. (provider: fmp)
|
||||
site : Optional[str]
|
||||
site : Optional[Union[str]]
|
||||
Name of the news source. (provider: fmp)
|
||||
amp_url : Optional[str]
|
||||
amp_url : Optional[Union[str]]
|
||||
AMP URL. (provider: polygon)
|
||||
image_url : Optional[str]
|
||||
image_url : Optional[Union[str]]
|
||||
Image URL. (provider: polygon)
|
||||
keywords : Optional[List[str]]
|
||||
keywords : Optional[Union[List[str]]]
|
||||
Keywords in the article (provider: polygon)
|
||||
publisher : Optional[Union[openbb_polygon.models.stock_news.PolygonPublisher, str]]
|
||||
Publisher of the article. (provider: polygon, yfinance)
|
||||
tickers : Optional[List[str]]
|
||||
tickers : Optional[Union[List[str]]]
|
||||
Tickers covered in the article. (provider: polygon)
|
||||
uuid : Optional[str]
|
||||
uuid : Optional[Union[str]]
|
||||
Unique identifier for the news article (provider: yfinance)
|
||||
type : Optional[str]
|
||||
type : Optional[Union[str]]
|
||||
Type of the news article (provider: yfinance)
|
||||
thumbnail : Optional[List]
|
||||
thumbnail : Optional[Union[List]]
|
||||
Thumbnail related data to the ticker news article. (provider: yfinance)
|
||||
related_tickers : Optional[str]
|
||||
related_tickers : Optional[Union[str]]
|
||||
Tickers related to the news article. (provider: yfinance)""" # noqa: E501
|
||||
|
||||
inputs = filter_inputs(
|
||||
@@ -668,11 +669,11 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def quote(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
symbol: typing_extensions.Annotated[
|
||||
Union[str, List[str]],
|
||||
OpenBBCustomParameter(description="Comma separated list of symbols."),
|
||||
] = None,
|
||||
provider: Optional[Literal["fmp", "intrinio"]] = None,
|
||||
provider: Union[Literal["fmp", "intrinio"], None] = None,
|
||||
**kwargs
|
||||
) -> OBBject[Union[List[Data], Data]]:
|
||||
"""Load stock data for a specific ticker.
|
||||
@@ -681,7 +682,7 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
symbol : str
|
||||
Comma separated list of symbols.
|
||||
provider : Optional[Literal['fmp', 'intrinio']]
|
||||
provider : Union[Literal['fmp', 'intrinio'], None]
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'fmp' if there is
|
||||
no default.
|
||||
@@ -693,7 +694,7 @@ class ROUTER_stocks(Container):
|
||||
OBBject
|
||||
results : Union[List[StockQuote], StockQuote]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['fmp', 'intrinio']]
|
||||
provider : Union[Literal['fmp', 'intrinio'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -704,29 +705,29 @@ class ROUTER_stocks(Container):
|
||||
|
||||
StockQuote
|
||||
----------
|
||||
day_low : Optional[float]
|
||||
day_low : Optional[Union[float]]
|
||||
Lowest price of the stock in the current trading day.
|
||||
day_high : Optional[float]
|
||||
day_high : Optional[Union[float]]
|
||||
Highest price of the stock in the current trading day.
|
||||
date : Optional[datetime]
|
||||
date : Optional[Union[datetime]]
|
||||
Timestamp of the stock quote.
|
||||
symbol : Optional[str]
|
||||
symbol : Optional[Union[str]]
|
||||
Symbol of the company. (provider: fmp)
|
||||
name : Optional[str]
|
||||
name : Optional[Union[str]]
|
||||
Name of the company. (provider: fmp)
|
||||
price : Optional[float]
|
||||
price : Optional[Union[float]]
|
||||
Current trading price of the stock. (provider: fmp)
|
||||
changes_percentage : Optional[float]
|
||||
changes_percentage : Optional[Union[float]]
|
||||
Change percentage of the stock price. (provider: fmp)
|
||||
change : Optional[float]
|
||||
change : Optional[Union[float]]
|
||||
Change in the stock price. (provider: fmp)
|
||||
year_high : Optional[float]
|
||||
year_high : Optional[Union[float]]
|
||||
Highest price of the stock in the last 52 weeks. (provider: fmp)
|
||||
year_low : Optional[float]
|
||||
year_low : Optional[Union[float]]
|
||||
Lowest price of the stock in the last 52 weeks. (provider: fmp)
|
||||
market_cap : Optional[float]
|
||||
market_cap : Optional[Union[float]]
|
||||
Market cap of the company. (provider: fmp)
|
||||
price_avg50 : Optional[float]
|
||||
price_avg50 : Optional[Union[float]]
|
||||
50 days average price of the stock. (provider: fmp)
|
||||
price_avg200 : Optional[int]
|
||||
200 days average price of the stock. (provider: fmp)
|
||||
@@ -734,63 +735,63 @@ class ROUTER_stocks(Container):
|
||||
Volume of the stock in the current trading day. (provider: fmp)
|
||||
avg_volume : Optional[int]
|
||||
Average volume of the stock in the last 10 trading days. (provider: fmp)
|
||||
exchange : Optional[str]
|
||||
exchange : Optional[Union[str]]
|
||||
Exchange the stock is traded on. (provider: fmp)
|
||||
open : Optional[float]
|
||||
open : Optional[Union[float]]
|
||||
Opening price of the stock in the current trading day. (provider: fmp)
|
||||
previous_close : Optional[float]
|
||||
previous_close : Optional[Union[float]]
|
||||
Previous closing price of the stock. (provider: fmp)
|
||||
eps : Optional[float]
|
||||
eps : Optional[Union[float]]
|
||||
Earnings per share of the stock. (provider: fmp)
|
||||
pe : Optional[float]
|
||||
pe : Optional[Union[float]]
|
||||
Price earnings ratio of the stock. (provider: fmp)
|
||||
earnings_announcement : Optional[str]
|
||||
earnings_announcement : Optional[Union[str]]
|
||||
Earnings announcement date of the stock. (provider: fmp)
|
||||
shares_outstanding : Optional[int]
|
||||
Number of shares outstanding of the stock. (provider: fmp)
|
||||
last_price : Optional[float]
|
||||
last_price : Optional[Union[float]]
|
||||
Price of the last trade. (provider: intrinio)
|
||||
last_time : Optional[datetime]
|
||||
last_time : Optional[Union[datetime]]
|
||||
Date and Time when the last trade occurred. (provider: intrinio)
|
||||
last_size : Optional[int]
|
||||
last_size : Optional[Union[int]]
|
||||
Size of the last trade. (provider: intrinio)
|
||||
bid_price : Optional[float]
|
||||
bid_price : Optional[Union[float]]
|
||||
Price of the top bid order. (provider: intrinio)
|
||||
bid_size : Optional[int]
|
||||
bid_size : Optional[Union[int]]
|
||||
Size of the top bid order. (provider: intrinio)
|
||||
ask_price : Optional[float]
|
||||
ask_price : Optional[Union[float]]
|
||||
Price of the top ask order. (provider: intrinio)
|
||||
ask_size : Optional[int]
|
||||
ask_size : Optional[Union[int]]
|
||||
Size of the top ask order. (provider: intrinio)
|
||||
open_price : Optional[float]
|
||||
open_price : Optional[Union[float]]
|
||||
Open price for the trading day. (provider: intrinio)
|
||||
close_price : Optional[float]
|
||||
close_price : Optional[Union[float]]
|
||||
Closing price for the trading day (IEX source only). (provider: intrinio)
|
||||
high_price : Optional[float]
|
||||
high_price : Optional[Union[float]]
|
||||
High Price for the trading day. (provider: intrinio)
|
||||
low_price : Optional[float]
|
||||
low_price : Optional[Union[float]]
|
||||
Low Price for the trading day. (provider: intrinio)
|
||||
exchange_volume : Optional[int]
|
||||
exchange_volume : Optional[Union[int]]
|
||||
Number of shares exchanged during the trading day on the exchange. (provider: intrinio)
|
||||
market_volume : Optional[int]
|
||||
market_volume : Optional[Union[int]]
|
||||
Number of shares exchanged during the trading day for the whole market. (provider: intrinio)
|
||||
updated_on : Optional[datetime]
|
||||
updated_on : Optional[Union[datetime]]
|
||||
Date and Time when the data was last updated. (provider: intrinio)
|
||||
source : Optional[str]
|
||||
source : Optional[Union[str]]
|
||||
Source of the data. (provider: intrinio)
|
||||
listing_venue : Optional[str]
|
||||
listing_venue : Optional[Union[str]]
|
||||
Listing venue where the trade took place (SIP source only). (provider: intrinio)
|
||||
sales_conditions : Optional[str]
|
||||
sales_conditions : Optional[Union[str]]
|
||||
Indicates any sales condition modifiers associated with the trade. (provider: intrinio)
|
||||
quote_conditions : Optional[str]
|
||||
quote_conditions : Optional[Union[str]]
|
||||
Indicates any quote condition modifiers associated with the trade. (provider: intrinio)
|
||||
market_center_code : Optional[str]
|
||||
market_center_code : Optional[Union[str]]
|
||||
Market center character code. (provider: intrinio)
|
||||
is_darkpool : Optional[bool]
|
||||
is_darkpool : Optional[Union[bool]]
|
||||
Whether or not the current trade is from a darkpool. (provider: intrinio)
|
||||
messages : Optional[List[str]]
|
||||
messages : Optional[Union[List[str]]]
|
||||
Messages associated with the endpoint. (provider: intrinio)
|
||||
security : Optional[Dict[str, Any]]
|
||||
security : Optional[Union[Dict[str, Any]]]
|
||||
Security details related to the quote. (provider: intrinio)""" # noqa: E501
|
||||
|
||||
inputs = filter_inputs(
|
||||
@@ -811,12 +812,14 @@ class ROUTER_stocks(Container):
|
||||
@validate_call
|
||||
def search(
|
||||
self,
|
||||
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
|
||||
ticker: Annotated[
|
||||
bool,
|
||||
OpenBBCustomParameter(description="Whether to search by ticker symbol."),
|
||||
query: typing_extensions.Annotated[
|
||||
str, OpenBBCustomParameter(description="Search query.")
|
||||
] = "",
|
||||
symbol: typing_extensions.Annotated[
|
||||
Union[bool, List[str]],
|
||||
OpenBBCustomParameter(description="Whether to search by a symbol."),
|
||||
] = False,
|
||||
provider: Optional[Literal["cboe"]] = None,
|
||||
provider: Union[Literal["cboe"], None] = None,
|
||||
**kwargs
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Search for a company or stock ticker.
|
||||
@@ -825,9 +828,9 @@ class ROUTER_stocks(Container):
|
||||
----------
|
||||
query : str
|
||||
Search query.
|
||||
ticker : bool
|
||||
Whether to search by ticker symbol.
|
||||
provider : Optional[Literal['cboe']]
|
||||
symbol : bool
|
||||
Whether to search by a symbol.
|
||||
provider : Union[Literal['cboe'], None]
|
||||
The provider to use for the query, by default None.
|
||||
If None, the provider specified in defaults is selected or 'cboe' if there is
|
||||
no default.
|
||||
@@ -835,9 +838,9 @@ class ROUTER_stocks(Container):
|
||||
Returns
|
||||
-------
|
||||
OBBject
|
||||
results : List[StockSearch]
|
||||
results : Union[List[StockSearch]]
|
||||
Serializable results.
|
||||
provider : Optional[Literal['cboe']]
|
||||
provider : Union[Literal['cboe'], None]
|
||||
Provider name.
|
||||
warnings : Optional[List[Warning_]]
|
||||
List of warnings.
|
||||
@@ -852,9 +855,9 @@ class ROUTER_stocks(Container):
|
||||
Symbol to get data for.
|
||||
name : str
|
||||
Name of the company.
|
||||
dpm_name : Optional[str]
|
||||
dpm_name : Optional[Union[str]]
|
||||
Name of the primary market maker. (provider: cboe)
|
||||
post_station : Optional[str]
|
||||
post_station : Optional[Union[str]]
|
||||
Post and station location on the CBOE trading floor. (provider: cboe)""" # noqa: E501
|
||||
|
||||
inputs = filter_inputs(
|
||||
@@ -863,7 +866,7 @@ class ROUTER_stocks(Container):
|
||||
},
|
||||
standard_params={
|
||||
"query": query,
|
||||
"ticker": ticker,
|
||||
"symbol": ",".join(symbol) if isinstance(symbol, list) else symbol,
|
||||
},
|
||||
extra_params=kwargs,
|
||||
)
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
from typing import List, Set, Union
|
||||
|
||||
from pydantic import Field, field_validator
|
||||
|
||||
from openbb_provider.abstract.data import Data
|
||||
from openbb_provider.abstract.query_params import QueryParams
|
||||
from openbb_provider.utils.descriptions import QUERY_DESCRIPTIONS
|
||||
from pydantic import Field, field_validator
|
||||
|
||||
|
||||
class StockSearchQueryParams(QueryParams):
|
||||
|
||||
Reference in New Issue
Block a user