static assets built on 3.8

This commit is contained in:
hjoaquim
2023-10-18 12:18:32 +01:00
parent e09629ea0e
commit fb82ff7bd9
14 changed files with 1584 additions and 1164 deletions

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -35,25 +39,29 @@ class ROUTER_crypto(Container):
@validate
def load(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(
description="Symbol Pair to get data for in CURR1-CURR2 or CURR1CURR2 format."
),
],
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,
<<<<<<< Updated upstream
provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None,
=======
provider: Union[Literal["fmp", "polygon", "yfinance"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Crypto Historical Price. Cryptocurrency historical price data.
@@ -62,15 +70,15 @@ class ROUTER_crypto(Container):
----------
symbol : str
Symbol Pair to get data for in CURR1-CURR2 or CURR1CURR2 format.
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.
provider : Optional[Literal['fmp', 'polygon', 'yfinance']]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], 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.
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)
interval : Optional[Union[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: fmp, yfinance)
@@ -84,15 +92,15 @@ class ROUTER_crypto(Container):
The number of data entries to return. (provider: polygon)
adjusted : bool
Whether the data is adjusted. (provider: polygon)
period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]
period : Optional[Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]]
Time period of the data to return. (provider: yfinance)
Returns
-------
OBBject
results : List[CryptoHistorical]
results : Union[List[CryptoHistorical]]
Serializable results.
provider : Optional[Literal['fmp', 'polygon', 'yfinance']]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -115,21 +123,21 @@ class ROUTER_crypto(Container):
The close price of the symbol.
volume : float
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[float]
adj_close : Optional[Union[float]]
Adjusted Close Price of the symbol. (provider: fmp)
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)
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)
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)
Example
--------

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -50,7 +54,7 @@ class ROUTER_econometrics(Container):
data: Union[List[Data], pandas.DataFrame],
y_column: str,
x_columns: List[str],
lags: Annotated[int, Gt(gt=0)] = 1,
lags: typing_extensions.Annotated[int, Gt(gt=0)] = 1,
) -> OBBject[Data]:
"""Perform Breusch-Godfrey Lagrange Multiplier tests for residual autocorrelation.
@@ -179,7 +183,7 @@ class ROUTER_econometrics(Container):
data: Union[List[Data], pandas.DataFrame],
y_column: str,
x_column: str,
lag: Annotated[int, Gt(gt=0)] = 3,
lag: typing_extensions.Annotated[int, Gt(gt=0)] = 3,
) -> OBBject[Data]:
"""Perform Granger causality test to determine if X "causes" y.

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -43,19 +47,19 @@ class ROUTER_fixedincome(Container):
@validate
def ameribor(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -66,11 +70,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -80,9 +84,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[AMERIBOR]
results : Union[List[AMERIBOR]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -95,6 +99,7 @@ class ROUTER_fixedincome(Container):
--------
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
AMERIBOR rate.
Example
@@ -103,6 +108,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.ameribor()
""" # noqa: E501
=======
rate : Union[float]
AMERIBOR rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -123,19 +132,19 @@ class ROUTER_fixedincome(Container):
@validate
def estr(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -147,11 +156,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -161,9 +170,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[ESTR]
results : Union[List[ESTR]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -176,6 +185,7 @@ class ROUTER_fixedincome(Container):
----
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
ESTR rate.
Example
@@ -184,6 +194,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.estr()
""" # noqa: E501
=======
rate : Union[float]
ESTR rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -204,19 +218,19 @@ class ROUTER_fixedincome(Container):
@validate
def fed(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -228,11 +242,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -242,9 +256,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[FEDFUNDS]
results : Union[List[FEDFUNDS]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -257,6 +271,7 @@ class ROUTER_fixedincome(Container):
--------
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
FED rate.
Example
@@ -265,6 +280,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.fed()
""" # noqa: E501
=======
rate : Union[float]
FED rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -285,19 +304,19 @@ class ROUTER_fixedincome(Container):
@validate
def iorb(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -309,11 +328,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -321,9 +340,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[IORB]
results : Union[List[IORB]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -336,6 +355,7 @@ class ROUTER_fixedincome(Container):
----
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
IORB rate.
Example
@@ -344,6 +364,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.iorb()
""" # noqa: E501
=======
rate : Union[float]
IORB rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -363,7 +387,7 @@ class ROUTER_fixedincome(Container):
@validate
def projections(
self, provider: Optional[Literal["fred"]] = None, **kwargs
self, provider: Union[Literal["fred"], None] = None, **kwargs
) -> OBBject[List[Data]]:
"""
Fed Funds Rate Projections.
@@ -375,7 +399,7 @@ class ROUTER_fixedincome(Container):
Parameters
----------
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -385,9 +409,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[PROJECTIONS]
results : Union[List[PROJECTIONS]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -400,18 +424,19 @@ class ROUTER_fixedincome(Container):
-----------
date : date
The date of the data.
range_high : Optional[float]
range_high : Union[float]
High projection of rates.
central_tendency_high : Optional[float]
central_tendency_high : Union[float]
Central tendency of high projection of rates.
median : Optional[float]
median : Union[float]
Median projection of rates.
range_midpoint : Optional[float]
range_midpoint : Union[float]
Midpoint projection of rates.
central_tendency_midpoint : Optional[float]
central_tendency_midpoint : Union[float]
Central tendency of midpoint projection of rates.
range_low : Optional[float]
range_low : Union[float]
Low projection of rates.
<<<<<<< Updated upstream
central_tendency_low : Optional[float]
Central tendency of low projection of rates.
Example
@@ -420,6 +445,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.projections()
""" # noqa: E501
=======
central_tendency_low : Union[float]
Central tendency of low projection of rates.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -437,19 +466,19 @@ class ROUTER_fixedincome(Container):
@validate
def sofr(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -460,11 +489,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -474,9 +503,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[SOFR]
results : Union[List[SOFR]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -489,6 +518,7 @@ class ROUTER_fixedincome(Container):
----
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
SOFR rate.
Example
@@ -497,6 +527,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.sofr()
""" # noqa: E501
=======
rate : Union[float]
SOFR rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -517,19 +551,19 @@ class ROUTER_fixedincome(Container):
@validate
def sonia(
self,
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,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""
@@ -540,11 +574,11 @@ class ROUTER_fixedincome(Container):
Parameters
----------
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.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -554,9 +588,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[SONIA]
results : Union[List[SONIA]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -569,6 +603,7 @@ class ROUTER_fixedincome(Container):
-----
date : date
The date of the data.
<<<<<<< Updated upstream
rate : Optional[float]
SONIA rate.
Example
@@ -577,6 +612,10 @@ class ROUTER_fixedincome(Container):
>>> from openbb import obb
>>> obb.fixedincome.sonia()
""" # noqa: E501
=======
rate : Union[float]
SONIA rate.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -597,30 +636,30 @@ class ROUTER_fixedincome(Container):
@validate
def treasury(
self,
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,
provider: Optional[Literal["fmp"]] = None,
provider: Union[Literal["fmp"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Treasury Rates. Treasury rates data.
Parameters
----------
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.
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.
@@ -628,9 +667,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[TreasuryRates]
results : Union[List[TreasuryRates]]
Serializable results.
provider : Optional[Literal['fmp']]
provider : Union[Literal['fmp'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -693,28 +732,28 @@ class ROUTER_fixedincome(Container):
@validate
def ycrv(
self,
date: Annotated[
Optional[datetime.date],
date: typing_extensions.Annotated[
Union[datetime.date, None],
OpenBBCustomParameter(
description="Date to get Yield Curve data. Defaults to the most recent FRED entry."
),
] = None,
inflation_adjusted: Annotated[
Optional[bool],
inflation_adjusted: typing_extensions.Annotated[
Union[bool, None],
OpenBBCustomParameter(description="Get inflation adjusted rates."),
] = False,
provider: Optional[Literal["fred"]] = None,
provider: Union[Literal["fred"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""US Yield Curve. Get United States yield curve.
Parameters
----------
date : Optional[datetime.date]
date : Union[datetime.date, None]
Date to get Yield Curve data. Defaults to the most recent FRED entry.
inflation_adjusted : Optional[bool]
inflation_adjusted : Union[bool, None]
Get inflation adjusted rates.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fred' if there is
no default.
@@ -722,9 +761,9 @@ class ROUTER_fixedincome(Container):
Returns
-------
OBBject
results : List[USYieldCurve]
results : Union[List[USYieldCurve]]
Serializable results.
provider : Optional[Literal['fred']]
provider : Union[Literal['fred'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -36,25 +40,25 @@ class ROUTER_forex(Container):
@validate
def load(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(
description="Symbol Pair to get data for in CURR1-CURR2 or CURR1CURR2 format."
),
],
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,
provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None,
provider: Union[Literal["fmp", "polygon", "yfinance"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Forex Historical Price. Forex historical data.
@@ -63,11 +67,11 @@ class ROUTER_forex(Container):
----------
symbol : str
Symbol Pair to get data for in CURR1-CURR2 or CURR1CURR2 format.
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.
provider : Optional[Literal['fmp', 'polygon', 'yfinance']]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], 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.
@@ -83,15 +87,15 @@ class ROUTER_forex(Container):
The number of data entries to return. (provider: polygon)
adjusted : bool
Whether the data is adjusted. (provider: polygon)
period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]
period : Optional[Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]]
Time period of the data to return. (provider: yfinance)
Returns
-------
OBBject
results : List[ForexHistorical]
results : Union[List[ForexHistorical]]
Serializable results.
provider : Optional[Literal['fmp', 'polygon', 'yfinance']]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -114,21 +118,21 @@ class ROUTER_forex(Container):
The close price of the symbol.
volume : float
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[float]
adj_close : Optional[Union[float]]
Adjusted Close Price of the symbol. (provider: fmp)
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)
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)
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)
Example
--------
@@ -156,37 +160,39 @@ class ROUTER_forex(Container):
@validate
def pairs(
self, provider: Optional[Literal["fmp", "intrinio", "polygon"]] = None, **kwargs
self,
provider: Union[Literal["fmp", "intrinio", "polygon"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Forex Pairs. Forex available pairs.
Parameters
----------
provider : Optional[Literal['fmp', 'intrinio', 'polygon']]
provider : Union[Literal['fmp', 'intrinio', 'polygon'], 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.
symbol : Optional[str]
symbol : Optional[Union[str]]
Symbol of the pair to search. (provider: polygon)
date : Optional[datetime.date]
date : Optional[Union[datetime.date]]
A specific date to get data for. (provider: polygon)
search : Optional[str]
search : Optional[Union[str]]
Search for terms within the ticker and/or company name. (provider: polygon)
active : Optional[bool]
active : Optional[Union[bool]]
Specify if the tickers returned should be actively traded on the queried date. (provider: polygon)
order : Optional[Literal['asc', 'desc']]
order : Optional[Union[Literal['asc', 'desc']]]
Order data by ascending or descending. (provider: polygon)
sort : Optional[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc']]
sort : Optional[Union[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc']]]
Sort field used for ordering. (provider: polygon)
limit : Optional[Annotated[int, Gt(gt=0)]]
limit : Optional[Union[typing_extensions.Annotated[int, Gt(gt=0)]]]
The number of data entries to return. (provider: polygon)
Returns
-------
OBBject
results : List[ForexPairs]
results : Union[List[ForexPairs]]
Serializable results.
provider : Optional[Literal['fmp', 'intrinio', 'polygon']]
provider : Union[Literal['fmp', 'intrinio', 'polygon'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -199,34 +205,35 @@ class ROUTER_forex(Container):
----------
name : str
Name of the currency pair.
symbol : Optional[str]
symbol : Optional[Union[str]]
Symbol of the currency pair. (provider: fmp)
currency : Optional[str]
currency : Optional[Union[str]]
Base currency of the currency pair. (provider: fmp)
stock_exchange : Optional[str]
stock_exchange : Optional[Union[str]]
Stock exchange of the currency pair. (provider: fmp)
exchange_short_name : Optional[str]
exchange_short_name : Optional[Union[str]]
Short name of the stock exchange of the currency pair. (provider: fmp)
code : Optional[str]
code : Optional[Union[str]]
Code of the currency pair. (provider: intrinio)
base_currency : Optional[str]
base_currency : Optional[Union[str]]
ISO 4217 currency code of the base currency. (provider: intrinio)
quote_currency : Optional[str]
quote_currency : Optional[Union[str]]
ISO 4217 currency code of the quote currency. (provider: intrinio)
market : Optional[str]
market : Optional[Union[str]]
Name of the trading market. Always 'fx'. (provider: polygon)
locale : Optional[str]
locale : Optional[Union[str]]
Locale of the currency pair. (provider: polygon)
currency_symbol : Optional[str]
currency_symbol : Optional[Union[str]]
The symbol of the quote currency. (provider: polygon)
currency_name : Optional[str]
currency_name : Optional[Union[str]]
Name of the quote currency. (provider: polygon)
base_currency_symbol : Optional[str]
base_currency_symbol : Optional[Union[str]]
The symbol of the base currency. (provider: polygon)
base_currency_name : Optional[str]
base_currency_name : Optional[Union[str]]
Name of the base currency. (provider: polygon)
last_updated_utc : Optional[datetime]
last_updated_utc : Optional[Union[datetime]]
The last updated timestamp in UTC. (provider: polygon)
<<<<<<< Updated upstream
delisted_utc : Optional[datetime]
The delisted timestamp in UTC. (provider: polygon)
Example
@@ -235,6 +242,10 @@ class ROUTER_forex(Container):
>>> from openbb import obb
>>> obb.forex.pairs()
""" # noqa: E501
=======
delisted_utc : Optional[Union[datetime]]
The delisted timestamp in UTC. (provider: polygon)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -36,15 +40,19 @@ class ROUTER_futures(Container):
@validate
def curve(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
date: Annotated[
Optional[datetime.date],
date: typing_extensions.Annotated[
Union[datetime.date, None],
OpenBBCustomParameter(description="Historical date to search curve for."),
] = None,
<<<<<<< Updated upstream
provider: Optional[Literal["cboe", "yfinance"]] = None,
=======
provider: Union[Literal["cboe", "yfinance"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Futures Historical Price. Futures historical data.
@@ -53,9 +61,9 @@ class ROUTER_futures(Container):
----------
symbol : str
Symbol to get data for.
date : Optional[datetime.date]
date : Union[datetime.date, None]
Historical date to search curve for.
provider : Optional[Literal['cboe', 'yfinance']]
provider : Union[Literal['cboe', 'yfinance'], 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.
@@ -63,9 +71,9 @@ class ROUTER_futures(Container):
Returns
-------
OBBject
results : List[FuturesCurve]
results : Union[List[FuturesCurve]]
Serializable results.
provider : Optional[Literal['cboe', 'yfinance']]
provider : Union[Literal['cboe', 'yfinance'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -78,8 +86,9 @@ class ROUTER_futures(Container):
------------
expiration : str
Futures expiration month.
price : Optional[float]
price : Optional[Union[float]]
The close price of the symbol.
<<<<<<< Updated upstream
symbol : Optional[str]
The trading symbol for the tenor of future. (provider: cboe)
Example
@@ -88,6 +97,10 @@ class ROUTER_futures(Container):
>>> from openbb import obb
>>> obb.futures.curve(symbol=AAPL)
""" # noqa: E501
=======
symbol : Optional[Union[str]]
The trading symbol for the tenor of future. (provider: cboe)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -108,27 +121,31 @@ class ROUTER_futures(Container):
@validate
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,
expiration: Annotated[
Optional[str],
expiration: typing_extensions.Annotated[
Union[str, None],
OpenBBCustomParameter(description="Future expiry date with format YYYY-MM"),
] = None,
<<<<<<< Updated upstream
provider: Optional[Literal["yfinance"]] = None,
=======
provider: Union[Literal["yfinance"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Futures Historical Price. Futures historical data.
@@ -137,19 +154,19 @@ class ROUTER_futures(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.
expiration : Optional[str]
expiration : Union[str, None]
Future expiry date with format YYYY-MM
provider : Optional[Literal['yfinance']]
provider : Union[Literal['yfinance'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'yfinance' if there is
no default.
interval : Optional[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']]
interval : Optional[Union[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']]]
Data granularity. (provider: yfinance)
period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]
period : Optional[Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]]
Time period of the data to return. (provider: yfinance)
prepost : bool
Include Pre and Post market data. (provider: yfinance)
@@ -161,9 +178,9 @@ class ROUTER_futures(Container):
Returns
-------
OBBject
results : List[FuturesHistorical]
results : Union[List[FuturesHistorical]]
Serializable results.
provider : Optional[Literal['yfinance']]
provider : Union[Literal['yfinance'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -35,10 +39,14 @@ class ROUTER_news(Container):
@validate
def globalnews(
self,
limit: Annotated[
limit: typing_extensions.Annotated[
int, OpenBBCustomParameter(description="Number of articles to return.")
] = 20,
<<<<<<< Updated upstream
provider: Optional[Literal["benzinga", "fmp", "intrinio"]] = None,
=======
provider: Union[Literal["benzinga", "fmp", "intrinio"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Global News. Global news data.
@@ -47,45 +55,45 @@ class ROUTER_news(Container):
----------
limit : int
Number of articles to return.
provider : Optional[Literal['benzinga', 'fmp', 'intrinio']]
provider : Union[Literal['benzinga', 'fmp', 'intrinio'], None]
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)
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)
Returns
-------
OBBject
results : List[GlobalNews]
results : Union[List[GlobalNews]]
Serializable results.
provider : Optional[Literal['benzinga', 'fmp', 'intrinio']]
provider : Union[Literal['benzinga', 'fmp', 'intrinio'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -100,28 +108,29 @@ class ROUTER_news(Container):
Published date of the news.
title : str
Title of the news.
images : Optional[List[Dict[str, str]]]
images : Optional[Union[List[Dict[str, str]]]]
Images associated with the news.
text : Optional[str]
text : Optional[Union[str]]
Text/body of the news.
url : Optional[str]
url : Optional[Union[str]]
URL of the news.
id : Optional[str]
id : Optional[Union[str]]
ID of the news. (provider: benzinga); Article ID. (provider: intrinio)
author : Optional[str]
author : Optional[Union[str]]
Author of the news. (provider: benzinga)
teaser : Optional[str]
teaser : Optional[Union[str]]
Teaser of 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
site : Optional[str]
site : Optional[Union[str]]
Site of the news. (provider: fmp)
<<<<<<< Updated upstream
company : Optional[Dict[str, Any]]
Company details related to the news article. (provider: intrinio)
Example
@@ -130,6 +139,10 @@ class ROUTER_news(Container):
>>> from openbb import obb
>>> obb.news.globalnews(limit=20)
""" # noqa: E501
=======
company : Optional[Union[Dict[str, Any]]]
Company details related to the news article. (provider: intrinio)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -68,7 +72,7 @@ class ROUTER_qa(Container):
self,
data: Union[List[Data], pandas.DataFrame],
target: str,
window: Annotated[int, Gt(gt=0)],
window: typing_extensions.Annotated[int, Gt(gt=0)],
) -> OBBject[List[Data]]:
"""Get the Kurtosis.
@@ -177,8 +181,8 @@ class ROUTER_qa(Container):
self,
data: Union[List[Data], pandas.DataFrame],
target: str,
window: Annotated[int, Gt(gt=0)],
quantile_pct: Annotated[float, Ge(ge=0)] = 0.5,
window: typing_extensions.Annotated[int, Gt(gt=0)],
quantile_pct: typing_extensions.Annotated[float, Ge(ge=0)] = 0.5,
) -> OBBject[List[Data]]:
"""Get Quantile.
@@ -217,7 +221,7 @@ class ROUTER_qa(Container):
data: Union[List[Data], pandas.DataFrame],
target: str,
rfr: float = 0.0,
window: Annotated[int, Gt(gt=0)] = 252,
window: typing_extensions.Annotated[int, Gt(gt=0)] = 252,
) -> OBBject[List[Data]]:
"""Get Sharpe Ratio.
@@ -255,7 +259,7 @@ class ROUTER_qa(Container):
self,
data: Union[List[Data], pandas.DataFrame],
target: str,
window: Annotated[int, Gt(gt=0)],
window: typing_extensions.Annotated[int, Gt(gt=0)],
) -> OBBject[List[Data]]:
"""Get Skewness.
@@ -291,7 +295,7 @@ class ROUTER_qa(Container):
data: Union[List[Data], pandas.DataFrame],
target: str,
target_return: float = 0.0,
window: Annotated[int, Gt(gt=0)] = 252,
window: typing_extensions.Annotated[int, Gt(gt=0)] = 252,
adjusted: bool = False,
) -> OBBject[List[Data]]:
"""Get Sortino Ratio.
@@ -364,7 +368,7 @@ class ROUTER_qa(Container):
self,
data: Union[List[Data], pandas.DataFrame],
target: str,
fuller_reg: Literal["c", "ct", "ctt", "nc"] = "c",
fuller_reg: Literal["c", "ct", "ctt", "nc", "c"] = "c",
kpss_reg: Literal["c", "ct"] = "c",
) -> OBBject[UnitRootModel]:
"""Get Unit Root Test.

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -55,11 +59,15 @@ class ROUTER_stocks(Container):
@validate
def info(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
<<<<<<< Updated upstream
provider: Optional[Literal["cboe"]] = None,
=======
provider: Union[Literal["cboe"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Stock Info. Get general price and performance metrics of a stock.
@@ -68,7 +76,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.
@@ -76,9 +84,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.
@@ -93,62 +101,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)
<<<<<<< Updated upstream
hv90_annual_high : Optional[float]
The 90-day high of realized volatility. (provider: cboe)
Example
@@ -157,6 +166,10 @@ class ROUTER_stocks(Container):
>>> from openbb import obb
>>> obb.stocks.info(symbol=AAPL)
""" # noqa: E501
=======
hv90_annual_high : Optional[Union[float]]
The 90-day high of realized volatility. (provider: cboe)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -176,29 +189,30 @@ class ROUTER_stocks(Container):
@validate
def load(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
interval: Annotated[
Optional[str],
interval: typing_extensions.Annotated[
Union[str, None],
OpenBBCustomParameter(description="Time interval of the data to return."),
] = "1d",
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]]:
@@ -208,35 +222,35 @@ class ROUTER_stocks(Container):
----------
symbol : str
Symbol to get data for.
interval : Optional[str]
interval : Union[str, None]
Time interval of the data to return.
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.
adjusted : Optional[bool]
adjusted : Optional[Union[bool]]
Output time series is adjusted by historical split and dividend events. (provider: alpha_vantage, polygon); Adjust all OHLC data automatically. (provider: yfinance)
extended_hours : Optional[bool]
extended_hours : Optional[Union[bool]]
Extended trading hours during pre-market and after-hours.Only available for intraday data. (provider: alpha_vantage)
month : Optional[str]
month : Optional[Union[str]]
Query a specific month in history (in YYYY-MM format). (provider: alpha_vantage)
output_size : Optional[Literal['compact', 'full']]
output_size : 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 is not specified, or the full intraday data for aspecific month in history if the month parameter is specified. (provider: alpha_vantage)
limit : Optional[Union[Annotated[int, Ge(ge=0)], int]]
limit : Optional[Union[typing_extensions.Annotated[int, Ge(ge=0)], int]]
Number of days to look back (Only for interval 1d). (provider: fmp); The number of data entries to return. (provider: polygon)
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)
timezone : str
Timezone of the data, in the IANA format (Continent/City). (provider: intrinio)
source : Optional[Literal['realtime', 'delayed', 'nasdaq_basic']]
source : Optional[Union[Literal['realtime', 'delayed', 'nasdaq_basic']]]
The source of the data. (provider: intrinio)
sort : Literal['asc', 'desc']
Sort order of the data. (provider: polygon)
@@ -252,9 +266,9 @@ class ROUTER_stocks(Container):
Returns
-------
OBBject
results : List[StockHistorical]
results : 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.
@@ -277,59 +291,59 @@ 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); Adjusted closing price during the period. (provider: intrinio)
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)
label : Optional[str]
label : Optional[Union[str]]
Human readable format of the date. (provider: fmp)
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)
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)
intra_period : Optional[bool]
intra_period : Optional[Union[bool]]
If true, the stock price represents an unfinished period (be it day, week, quarter, month, or year), meaning that the close price is the latest price available, not the official close price for the period (provider: intrinio)
adj_open : Optional[float]
adj_open : Optional[Union[float]]
Adjusted open price during the period. (provider: intrinio)
adj_high : Optional[float]
adj_high : Optional[Union[float]]
Adjusted high price during the period. (provider: intrinio)
adj_low : Optional[float]
adj_low : Optional[Union[float]]
Adjusted low price during the period. (provider: intrinio)
adj_volume : Optional[float]
adj_volume : Optional[Union[float]]
Adjusted volume during the period. (provider: intrinio)
factor : Optional[float]
factor : Optional[Union[float]]
factor by which to multiply stock prices before this date, in order to calculate historically-adjusted stock prices. (provider: intrinio)
split_ratio : Optional[float]
split_ratio : Optional[Union[float]]
Ratio of the stock split, if a stock split occurred. (provider: intrinio)
dividend : Optional[float]
dividend : Optional[Union[float]]
Dividend amount, if a dividend was paid. (provider: intrinio)
percent_change : Optional[float]
percent_change : Optional[Union[float]]
Percent change in the price of the symbol from the previous day. (provider: intrinio)
fifty_two_week_high : Optional[float]
fifty_two_week_high : Optional[Union[float]]
52 week high price for the symbol. (provider: intrinio)
fifty_two_week_low : Optional[float]
fifty_two_week_low : Optional[Union[float]]
52 week low price for the symbol. (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)
Example
--------
@@ -360,16 +374,20 @@ class ROUTER_stocks(Container):
@validate
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,
<<<<<<< Updated upstream
provider: Optional[Literal["fmp"]] = None,
=======
provider: Union[Literal["fmp"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Stock Multiples. Valuation multiples for a stock ticker.
@@ -378,11 +396,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.
@@ -390,9 +408,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.
@@ -403,124 +421,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.
<<<<<<< Updated upstream
capex_per_share_ttm : Optional[float]
Capital expenditures per share calculated as trailing twelve months.
Example
@@ -529,6 +548,10 @@ class ROUTER_stocks(Container):
>>> from openbb import obb
>>> obb.stocks.multiples(symbol=AAPL, limit=100)
""" # noqa: E501
=======
capex_per_share_ttm : Optional[Union[float]]
Capital expenditures per share calculated as trailing twelve months.""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -550,16 +573,16 @@ class ROUTER_stocks(Container):
@validate
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]]:
@@ -569,53 +592,53 @@ 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)
page : Optional[int]
page : Optional[Union[int]]
Page number of the results. Use in combination with limit. (provider: fmp)
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.
@@ -630,48 +653,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[Union[List[Dict[str, str]], List[str], str]]
Images associated with the news. (provider: benzinga); URL to the images of the news. (provider: fmp)
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)
<<<<<<< Updated upstream
related_tickers : Optional[str]
Tickers related to the news article. (provider: yfinance)
Example
@@ -680,6 +704,10 @@ class ROUTER_stocks(Container):
>>> from openbb import obb
>>> obb.stocks.news(symbols=AAPL,MSFT, limit=20)
""" # noqa: E501
=======
related_tickers : Optional[Union[str]]
Tickers related to the news article. (provider: yfinance)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -707,11 +735,15 @@ class ROUTER_stocks(Container):
@validate
def quote(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Comma separated list of symbols."),
],
<<<<<<< Updated upstream
provider: Optional[Literal["fmp", "intrinio"]] = None,
=======
provider: Union[Literal["fmp", "intrinio"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[Union[List[Data], Data]]:
"""Stock Quote. Load stock data for a specific ticker.
@@ -720,7 +752,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.
@@ -732,7 +764,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.
@@ -743,29 +775,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)
@@ -773,62 +805,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)
<<<<<<< Updated upstream
security : Optional[Dict[str, Any]]
Security details related to the quote. (provider: intrinio)
Example
@@ -837,6 +870,10 @@ class ROUTER_stocks(Container):
>>> from openbb import obb
>>> obb.stocks.quote(symbol=AAPL)
""" # noqa: E501
=======
security : Optional[Union[Dict[str, Any]]]
Security details related to the quote. (provider: intrinio)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={
@@ -856,12 +893,18 @@ class ROUTER_stocks(Container):
@validate
def search(
self,
query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "",
is_symbol: Annotated[
query: typing_extensions.Annotated[
str, OpenBBCustomParameter(description="Search query.")
] = "",
is_symbol: typing_extensions.Annotated[
bool,
OpenBBCustomParameter(description="Whether to search by ticker symbol."),
] = False,
<<<<<<< Updated upstream
provider: Optional[Literal["cboe"]] = None,
=======
provider: Union[Literal["cboe"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Stock Search. Search for a company or stock ticker.
@@ -872,7 +915,7 @@ class ROUTER_stocks(Container):
Search query.
is_symbol : bool
Whether to search by ticker symbol.
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.
@@ -880,9 +923,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.
@@ -897,8 +940,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)
<<<<<<< Updated upstream
post_station : Optional[str]
Post and station location on the CBOE trading floor. (provider: cboe)
Example
@@ -907,6 +951,10 @@ class ROUTER_stocks(Container):
>>> from openbb import obb
>>> obb.stocks.search()
""" # noqa: E501
=======
post_station : Optional[Union[str]]
Post and station location on the CBOE trading floor. (provider: cboe)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -35,11 +39,11 @@ class ROUTER_stocks_ca(Container):
@validate
def peers(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
provider: Optional[Literal["fmp"]] = None,
provider: Union[Literal["fmp"], None] = None,
**kwargs
) -> OBBject[Data]:
"""Stock Peers. Company peers.
@@ -48,7 +52,7 @@ class ROUTER_stocks_ca(Container):
----------
symbol : str
Symbol to get data for.
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.
@@ -56,9 +60,9 @@ class ROUTER_stocks_ca(Container):
Returns
-------
OBBject
results : StockPeers
results : Union[StockPeers]
Serializable results.
provider : Optional[Literal['fmp']]
provider : Union[Literal['fmp'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -35,11 +39,15 @@ class ROUTER_stocks_options(Container):
@validate
def chains(
self,
symbol: Annotated[
symbol: typing_extensions.Annotated[
Union[str, List[str]],
OpenBBCustomParameter(description="Symbol to get data for."),
],
<<<<<<< Updated upstream
provider: Optional[Literal["cboe", "intrinio"]] = None,
=======
provider: Union[Literal["cboe", "intrinio"], None] = None,
>>>>>>> Stashed changes
**kwargs
) -> OBBject[List[Data]]:
"""Get the complete options chain for a ticker.
@@ -48,19 +56,19 @@ class ROUTER_stocks_options(Container):
----------
symbol : str
Symbol to get data for.
provider : Optional[Literal['cboe', 'intrinio']]
provider : Union[Literal['cboe', 'intrinio'], 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.
date : Optional[datetime.date]
date : Optional[Union[datetime.date]]
Date for which the options chains are returned. (provider: intrinio)
Returns
-------
OBBject
results : List[OptionsChains]
results : Union[List[OptionsChains]]
Serializable results.
provider : Optional[Literal['cboe', 'intrinio']]
provider : Union[Literal['cboe', 'intrinio'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
@@ -73,7 +81,7 @@ class ROUTER_stocks_options(Container):
-------------
contract_symbol : str
Contract symbol for the option.
symbol : Optional[str]
symbol : Optional[Union[str]]
Underlying symbol for the option.
expiration : date
Expiration date of the contract.
@@ -81,68 +89,69 @@ class ROUTER_stocks_options(Container):
Strike price of the contract.
option_type : str
Call or Put.
eod_date : Optional[date]
eod_date : Optional[Union[date]]
Date for which the options chains are returned.
close : Optional[float]
close : Optional[Union[float]]
Close price for the option that day.
close_bid : Optional[float]
close_bid : Optional[Union[float]]
The closing bid price for the option that day.
close_ask : Optional[float]
close_ask : Optional[Union[float]]
The closing ask price for the option that day.
volume : Optional[float]
volume : Optional[Union[float]]
Current trading volume on the contract.
open : Optional[float]
open : Optional[Union[float]]
Opening price of the option.
open_bid : Optional[float]
open_bid : Optional[Union[float]]
The opening bid price for the option that day.
open_ask : Optional[float]
open_ask : Optional[Union[float]]
The opening ask price for the option that day.
open_interest : Optional[float]
open_interest : Optional[Union[float]]
Open interest on the contract.
high : Optional[float]
high : Optional[Union[float]]
High price of the option.
low : Optional[float]
low : Optional[Union[float]]
Low price of the option.
mark : Optional[float]
mark : Optional[Union[float]]
The mid-price between the latest bid-ask spread.
ask_high : Optional[float]
ask_high : Optional[Union[float]]
The highest ask price for the option that day.
ask_low : Optional[float]
ask_low : Optional[Union[float]]
The lowest ask price for the option that day.
bid_high : Optional[float]
bid_high : Optional[Union[float]]
The highest bid price for the option that day.
bid_low : Optional[float]
bid_low : Optional[Union[float]]
The lowest bid price for the option that day.
implied_volatility : Optional[float]
implied_volatility : Optional[Union[float]]
Implied volatility of the option.
delta : Optional[float]
delta : Optional[Union[float]]
Delta of the option.
gamma : Optional[float]
gamma : Optional[Union[float]]
Gamma of the option.
theta : Optional[float]
theta : Optional[Union[float]]
Theta of the option.
vega : Optional[float]
vega : Optional[Union[float]]
Vega of the option.
bid_size : Optional[int]
bid_size : Optional[Union[int]]
Bid size for the option. (provider: cboe)
ask_size : Optional[int]
ask_size : Optional[Union[int]]
Ask size for the option. (provider: cboe)
theoretical : Optional[float]
theoretical : Optional[Union[float]]
Theoretical value of the option. (provider: cboe)
last_trade_price : Optional[float]
last_trade_price : Optional[Union[float]]
Last trade price of the option. (provider: cboe)
tick : Optional[str]
tick : Optional[Union[str]]
Whether the last tick was up or down in price. (provider: cboe)
prev_close : Optional[float]
prev_close : Optional[Union[float]]
Previous closing price of the option. (provider: cboe)
change : Optional[float]
change : Optional[Union[float]]
Change in price of the option. (provider: cboe)
change_percent : Optional[float]
change_percent : Optional[Union[float]]
Change, in percent, of the option. (provider: cboe)
rho : Optional[float]
rho : Optional[Union[float]]
Rho of the option. (provider: cboe)
last_trade_timestamp : Optional[datetime]
last_trade_timestamp : Optional[Union[datetime]]
Last trade timestamp of the option. (provider: cboe)
<<<<<<< Updated upstream
dte : Optional[int]
Days to expiration for the option. (provider: cboe)
Example
@@ -151,6 +160,10 @@ class ROUTER_stocks_options(Container):
>>> from openbb import obb
>>> obb.stocks.options.chains(symbol=AAPL)
""" # noqa: E501
=======
dte : Optional[Union[int]]
Days to expiration for the option. (provider: cboe)""" # noqa: E501
>>>>>>> Stashed changes
inputs = filter_inputs(
provider_choices={

View File

@@ -12,7 +12,11 @@ from inspect import Parameter
import typing
from typing import List, Dict, Union, Optional, Literal
from annotated_types import Ge, Le, Gt, Lt
<<<<<<< Updated upstream
from typing_extensions import Annotated
=======
import typing_extensions
>>>>>>> Stashed changes
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.decorators import validate
@@ -113,8 +117,8 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
fast: Annotated[int, Gt(gt=0)] = 3,
slow: Annotated[int, Gt(gt=0)] = 10,
fast: typing_extensions.Annotated[int, Gt(gt=0)] = 3,
slow: typing_extensions.Annotated[int, Gt(gt=0)] = 10,
offset: int = 0,
) -> OBBject[List[Data]]:
"""
@@ -278,9 +282,9 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
length: Annotated[int, Gt(gt=0)] = 14,
length: typing_extensions.Annotated[int, Gt(gt=0)] = 14,
mamode: Literal["rma", "ema", "sma", "wma"] = "rma",
drift: Annotated[int, Ge(ge=0)] = 1,
drift: typing_extensions.Annotated[int, Ge(ge=0)] = 1,
offset: int = 0,
) -> OBBject[List[Data]]:
"""
@@ -335,7 +339,7 @@ class ROUTER_ta(Container):
target: str = "close",
index: str = "date",
length: int = 50,
std: Annotated[float, Ge(ge=0)] = 2,
std: typing_extensions.Annotated[float, Ge(ge=0)] = 2,
mamode: Literal["sma", "ema", "wma", "rma"] = "sma",
offset: int = 0,
) -> OBBject[List[Data]]:
@@ -404,8 +408,8 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
length: Annotated[int, Gt(gt=0)] = 14,
scalar: Annotated[float, Gt(gt=0)] = 0.015,
length: typing_extensions.Annotated[int, Gt(gt=0)] = 14,
scalar: typing_extensions.Annotated[float, Gt(gt=0)] = 0.015,
) -> OBBject[List[Data]]:
"""
The CCI is designed to detect beginning and ending market trends.
@@ -448,7 +452,7 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
length: Annotated[int, Gt(gt=0)] = 14,
length: typing_extensions.Annotated[int, Gt(gt=0)] = 14,
) -> OBBject[List[Data]]:
"""
The Center of Gravity indicator, in short, is used to anticipate future price movements
@@ -495,7 +499,7 @@ class ROUTER_ta(Container):
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
target: str = "close",
period: Annotated[int, Gt(gt=0)] = 90,
period: typing_extensions.Annotated[int, Gt(gt=0)] = 90,
) -> OBBject[List[Data]]:
"""
Clenow Volatility Adjusted Momentum.
@@ -676,8 +680,8 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
lower_length: Annotated[int, Gt(gt=0)] = 20,
upper_length: Annotated[int, Gt(gt=0)] = 20,
lower_length: typing_extensions.Annotated[int, Gt(gt=0)] = 20,
upper_length: typing_extensions.Annotated[int, Gt(gt=0)] = 20,
offset: int = 0,
) -> OBBject[List[Data]]:
"""
@@ -792,9 +796,9 @@ class ROUTER_ta(Container):
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
close_column: Literal["close", "adj_close"] = "close",
period: Annotated[int, Gt(gt=0)] = 120,
start_date: Optional[str] = None,
end_date: Optional[str] = None,
period: typing_extensions.Annotated[int, Gt(gt=0)] = 120,
start_date: Union[str, None] = None,
end_date: Union[str, None] = None,
) -> OBBject[List[Data]]:
"""Create Fibonacci Retracement Levels.
@@ -838,8 +842,8 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
length: Annotated[int, Gt(gt=0)] = 14,
signal: Annotated[int, Gt(gt=0)] = 1,
length: typing_extensions.Annotated[int, Gt(gt=0)] = 14,
signal: typing_extensions.Annotated[int, Gt(gt=0)] = 1,
) -> OBBject[List[Data]]:
"""
The Fisher Transform is a technical indicator created by John F. Ehlers
@@ -943,10 +947,10 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
conversion: Annotated[int, Gt(gt=0)] = 9,
base: Annotated[int, Gt(gt=0)] = 26,
lagging: Annotated[int, Gt(gt=0)] = 52,
offset: Annotated[int, Gt(gt=0)] = 26,
conversion: typing_extensions.Annotated[int, Gt(gt=0)] = 9,
base: typing_extensions.Annotated[int, Gt(gt=0)] = 26,
lagging: typing_extensions.Annotated[int, Gt(gt=0)] = 52,
offset: typing_extensions.Annotated[int, Gt(gt=0)] = 26,
lookahead: bool = False,
) -> OBBject[List[Data]]:
"""
@@ -993,10 +997,10 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
length: Annotated[int, Gt(gt=0)] = 20,
scalar: Annotated[float, Gt(gt=0)] = 20,
length: typing_extensions.Annotated[int, Gt(gt=0)] = 20,
scalar: typing_extensions.Annotated[float, Gt(gt=0)] = 20,
mamode: Literal["ema", "sma", "wma", "hma", "zlma"] = "ema",
offset: Annotated[int, Ge(ge=0)] = 0,
offset: typing_extensions.Annotated[int, Ge(ge=0)] = 0,
) -> OBBject[List[Data]]:
"""
Keltner Channels are volatility-based bands that are placed
@@ -1283,9 +1287,9 @@ class ROUTER_ta(Container):
self,
data: Union[List[Data], pandas.DataFrame],
index: str = "date",
fast_k_period: Annotated[int, Ge(ge=0)] = 14,
slow_d_period: Annotated[int, Ge(ge=0)] = 3,
slow_k_period: Annotated[int, Ge(ge=0)] = 3,
fast_k_period: typing_extensions.Annotated[int, Ge(ge=0)] = 14,
slow_d_period: typing_extensions.Annotated[int, Ge(ge=0)] = 3,
slow_k_period: typing_extensions.Annotated[int, Ge(ge=0)] = 3,
) -> OBBject[List[Data]]:
"""
The Stochastic Oscillator measures where the close is in relation