mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 23:12:21 +00:00
build package
This commit is contained in:
@@ -43,7 +43,7 @@ def request(url: str) -> BasicResponse:
|
||||
BasicRequest object with status_code and text attributes
|
||||
"""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
from pyodide.http import open_url
|
||||
from pyodide.http import open_url # type: ignore
|
||||
|
||||
response = open_url(url)
|
||||
return BasicResponse(response)
|
||||
|
||||
@@ -4,7 +4,7 @@ import datetime
|
||||
import typing
|
||||
from typing import List, Literal, Optional, Union
|
||||
|
||||
from pydantic import validate_arguments
|
||||
from pydantic import BaseModel, validate_arguments
|
||||
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
@@ -186,7 +186,7 @@ class CLASS_economy(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fred"]] = None,
|
||||
**kwargs,
|
||||
) -> CommandOutput[typing.List]:
|
||||
) -> CommandOutput[BaseModel]:
|
||||
"""CPI.
|
||||
|
||||
|
||||
@@ -371,13 +371,11 @@ class CLASS_economy(Container):
|
||||
Unadjusted volume of the symbol.
|
||||
change : Optional[float]
|
||||
Change in the price of the symbol from the previous day.
|
||||
changePercent : float
|
||||
changePercent : Optional[float]
|
||||
Change \\% in the price of the symbol.
|
||||
vwap : float
|
||||
Volume Weighted Average Price of the symbol.
|
||||
label : str
|
||||
label : Optional[str]
|
||||
Human readable format of the date.
|
||||
changeOverTime : float
|
||||
changeOverTime : Optional[float]
|
||||
Change \\% in the price of the symbol over a period of time.
|
||||
|
||||
polygon
|
||||
|
||||
@@ -57,9 +57,7 @@ class CLASS_news(Container):
|
||||
The published date of the news.
|
||||
title : str
|
||||
The title of the news.
|
||||
image : Optional[str]
|
||||
The image URL of the news.
|
||||
text : str
|
||||
text : Optional[str]
|
||||
The text/body of the news.
|
||||
url : str
|
||||
The URL of the news.
|
||||
|
||||
@@ -158,11 +158,11 @@ class CLASS_stocks(Container):
|
||||
Unadjusted volume of the symbol.
|
||||
change : Optional[float]
|
||||
Change in the price of the symbol from the previous day.
|
||||
changePercent : float
|
||||
changePercent : Optional[float]
|
||||
Change \\% in the price of the symbol.
|
||||
label : str
|
||||
label : Optional[str]
|
||||
Human readable format of the date.
|
||||
changeOverTime : float
|
||||
changeOverTime : Optional[float]
|
||||
Change \\% in the price of the symbol over a period of time.
|
||||
|
||||
polygon
|
||||
@@ -367,7 +367,7 @@ class CLASS_stocks(Container):
|
||||
publisher : PolygonPublisher
|
||||
Publisher of the article.
|
||||
tickers : List[str]
|
||||
Tickers covered in the article."""
|
||||
Tickers covered in the article.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
"provider": provider,
|
||||
@@ -602,7 +602,7 @@ class CLASS_stocks(Container):
|
||||
@validate_arguments
|
||||
def quote(
|
||||
self,
|
||||
symbol: Optional[str] = None,
|
||||
symbol: str,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs,
|
||||
@@ -617,8 +617,8 @@ class CLASS_stocks(Container):
|
||||
----------
|
||||
provider: Literal[fmp]
|
||||
The provider to use for the query.
|
||||
symbol : Optional[str]
|
||||
Comma separated list of symbols.
|
||||
symbol : ConstrainedStrValue
|
||||
Symbol to get data for.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
|
||||
|
||||
import typing
|
||||
from typing import Literal, Optional
|
||||
|
||||
from pydantic import validate_arguments
|
||||
from pydantic import BaseModel, validate_arguments
|
||||
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
@@ -21,7 +20,7 @@ class CLASS_stocks_ca(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs,
|
||||
) -> CommandOutput[typing.List]:
|
||||
) -> CommandOutput[BaseModel]:
|
||||
"""Company peers.
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import typing
|
||||
from typing import List, Literal, Optional, Union
|
||||
|
||||
import pydantic
|
||||
from pydantic import validate_arguments
|
||||
from pydantic import BaseModel, validate_arguments
|
||||
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
@@ -2537,7 +2537,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs,
|
||||
) -> CommandOutput[typing.List]:
|
||||
) -> CommandOutput[BaseModel]:
|
||||
"""Company Overview.
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> atr_data = obb.ta.atr(data=stock_data.results)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -109,7 +109,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> fib_data = obb.ta.fib(data=stock_data.results, period=120)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -166,7 +166,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> obv_data = obb.ta.obv(data=stock_data.results, offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -219,7 +219,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> fisher_data = obb.ta.fisher(data=stock_data.results, length=14, signal=1)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -275,7 +275,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> adosc_data = obb.ta.adosc(data=stock_data.results, fast=3, slow=10, offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -297,7 +297,7 @@ class CLASS_ta(Container):
|
||||
def tv(
|
||||
self, chart: bool = False
|
||||
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
|
||||
"""TradingView."""
|
||||
"""TradingView.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -365,7 +365,7 @@ class CLASS_ta(Container):
|
||||
>>> bbands = obb.ta.bbands(
|
||||
>>> data=stock_data.results, target="close", length=50, std=2, mamode="sma", offset=0
|
||||
>>> )
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -389,7 +389,7 @@ class CLASS_ta(Container):
|
||||
def multi(
|
||||
self, chart: bool = False
|
||||
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot multiple indicators on the same chart."""
|
||||
"""Plot multiple indicators on the same chart.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -444,7 +444,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> zlma_data = obb.ta.zlma(data=stock_data.results, target="close", length=50, offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -506,7 +506,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> aroon_data = obb.ta.aroon(data=stock_data.results, length=25, scalar=100)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -565,7 +565,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> sma_data = obb.ta.sma(data=stock_data.results,target="close",length=50,offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -622,7 +622,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> demark_data = obb.ta.demark(data=stock_data.results,offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -677,7 +677,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> vwap_data = obb.ta.vwap(data=stock_data.results,anchor="D",offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -698,7 +698,7 @@ class CLASS_ta(Container):
|
||||
def recom(
|
||||
self, chart: bool = False
|
||||
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Recommendation."""
|
||||
"""Recommendation.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -758,7 +758,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> macd_data = obb.ta.macd(data=stock_data.results,target="close",fast=12,slow=26,signal=9)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -816,7 +816,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> hma_data = obb.ta.hma(data=stock_data.results,target="close",length=50,offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -875,7 +875,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> donchian_data = obb.ta.donchian(data=stock_data.results,lower_length=20,upper_length=20,offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -927,7 +927,7 @@ class CLASS_ta(Container):
|
||||
Number of periods for the offset, by default 26.
|
||||
lookahead : bool, optional
|
||||
drops the Chikou Span Column to prevent potential data leak
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -980,7 +980,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> clenow_data = obb.ta.clenow(data=stock_data.results,period=90)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1037,7 +1037,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> ad_data = obb.ta.ad(data=stock_data.results,offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1091,7 +1091,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> adx_data = obb.ta.adx(data=stock_data.results,length=50,scalar=100.0,drift=1)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1121,7 +1121,7 @@ class CLASS_ta(Container):
|
||||
) -> CommandOutput[typing.List]:
|
||||
"""
|
||||
A Weighted Moving Average puts more weight on recent data and less on past data.
|
||||
This is done by multiplying each bar<EFBFBD>s price by a weighting factor. Because of its
|
||||
This is done by multiplying each bar’s price by a weighting factor. Because of its
|
||||
unique calculation, WMA will follow prices more closely than a corresponding Simple
|
||||
Moving Average.
|
||||
|
||||
@@ -1148,7 +1148,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> wma_data = obb.ta.wma(data=stock_data.results, target="close", length=50, offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -1197,7 +1197,7 @@ class CLASS_ta(Container):
|
||||
-------
|
||||
CommandOutput[List[Data]]
|
||||
The CCI data.
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1257,7 +1257,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> rsi_data = obb.ta.rsi(data=stock_data.results, target="close", length=14, scalar=100.0, drift=1)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
@@ -1280,7 +1280,7 @@ class CLASS_ta(Container):
|
||||
def summary(
|
||||
self, chart: bool = False
|
||||
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Summary."""
|
||||
"""Summary.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -1334,7 +1334,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> stoch_data = obb.ta.stoch(data=stock_data.results, fast_k_period=14, slow_d_period=3, slow_k_period=3)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1356,7 +1356,7 @@ class CLASS_ta(Container):
|
||||
def rsp(
|
||||
self, chart: bool = False
|
||||
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Relative Strength Performance."""
|
||||
"""Relative Strength Performance.""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -1412,7 +1412,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> kc_data = obb.ta.kc(data=stock_data.results, length=20, scalar=20, ma_mode="ema", offset=0)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1465,7 +1465,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> cg_data = obb.ta.cg(data=stock_data.results, length=14)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1548,7 +1548,7 @@ class CLASS_ta(Container):
|
||||
>>> from openbb import obb
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> cones_data = obb.ta.cones(data=stock_data.results, lower_q=0.25, upper_q=0.75, model="STD")
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
index=index,
|
||||
@@ -1611,7 +1611,7 @@ class CLASS_ta(Container):
|
||||
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
|
||||
>>> ema_data = obb.ta.ema(data=stock_data.results,target="close",length=50,offset=0)
|
||||
|
||||
"""
|
||||
""" # noqa: E501
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
target=target,
|
||||
|
||||
Reference in New Issue
Block a user