static files

This commit is contained in:
Pratyush Shukla
2023-08-11 01:14:00 +05:30
parent 87c0d8d2c4
commit 012529b8bb
13 changed files with 463 additions and 377 deletions

View File

@@ -1,6 +1,7 @@
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
from openbb_core.app.static.container import Container

View File

@@ -34,7 +34,7 @@ class CLASS_crypto(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Crypto Intraday Price.

View File

@@ -51,7 +51,7 @@ class CLASS_economy(Container):
] = "dowjones",
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Get the constituents of an index.
@@ -217,7 +217,7 @@ class CLASS_economy(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fred"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[BaseModel]:
"""CPI.
@@ -347,7 +347,7 @@ class CLASS_economy(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Get OHLCV data for an index.

View File

@@ -33,7 +33,7 @@ class CLASS_fixedincome(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Get treasury rates.

View File

@@ -19,7 +19,7 @@ class CLASS_forex(Container):
self,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Forex Available Pairs.
@@ -148,7 +148,7 @@ class CLASS_forex(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Forex Intraday Price.

View File

@@ -243,4 +243,4 @@
"ta_cg": "/ta/cg",
"ta_cones": "/ta/cones",
"ta_ema": "/ta/ema"
}
}

View File

@@ -25,7 +25,7 @@ class CLASS_news(Container):
] = 0,
chart: bool = False,
provider: Optional[Literal["benzinga", "fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Global News.

View File

@@ -5,7 +5,8 @@ import typing
from typing import Annotated, Literal, Optional, Union
import pydantic
from pydantic import validate_arguments
import pydantic.main
from pydantic import BaseModel, validate_arguments
import openbb_core.app.model.command_context
import openbb_core.app.model.results.empty
@@ -104,7 +105,6 @@ class CLASS_stocks(Container):
**kwargs
) -> CommandOutput[typing.List]:
"""Load stock data for a specific ticker.
"""Load stock data for a specific ticker.
openbb
@@ -150,9 +150,21 @@ class CLASS_stocks(Container):
The close price of the symbol.
volume : float
The volume of the symbol.
vwap : PositiveFloat
vwap : Optional[PositiveFloat]
Volume Weighted Average Price of the symbol.
cboe
====
Parameters
----------
All fields are standardized.
StockEOD
--------
All fields are standardized.
fmp
===
@@ -172,12 +184,12 @@ 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
Change \% in the price of the symbol.
label : str
changePercent : Optional[float]
Change \\% in the price of the symbol.
label : Optional[str]
Human readable format of the date.
changeOverTime : float
Change \% in the price of the symbol over a period of time.
changeOverTime : Optional[float]
Change \\% in the price of the symbol over a period of time.
polygon
=======
@@ -241,7 +253,7 @@ class CLASS_stocks(Container):
] = 15,
chart: bool = False,
provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Get news for one or more stock tickers.
@@ -427,7 +439,7 @@ class CLASS_stocks(Container):
] = 100,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Get valuation multiples for a stock ticker.
@@ -633,12 +645,17 @@ class CLASS_stocks(Container):
@validate_arguments
def search(
self,
query: str = "",
ticker: bool = False,
query: typing.Annotated[
str, OpenBBCustomParameter(description="The search query.")
] = "",
ticker: typing.Annotated[
bool,
OpenBBCustomParameter(description="Whether to search by ticker symbol."),
] = False,
chart: bool = False,
provider: Optional[Literal["cboe"]] = None,
**kwargs
) -> CommandOutput[typing.List]:
) -> CommandOutput[BaseModel]:
"""Search for a company or stock ticker.
@@ -689,7 +706,7 @@ class CLASS_stocks(Container):
dpmName : Optional[str]
The name of the primary market maker.
postStation : Optional[str]
The post and station location on the CBOE trading floor."""
The post and station location on the CBOE trading floor.""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
@@ -712,9 +729,100 @@ class CLASS_stocks(Container):
@filter_call
@validate_arguments
def quote(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""View the current price for a specific stock ticker."""
self,
symbol: typing.Annotated[
str, OpenBBCustomParameter(description="Symbol to get data for.")
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs
) -> CommandOutput[typing.List]:
"""Load stock data for a specific ticker.
openbb
======
Parameters
----------
provider: Literal[fmp]
The provider to use for the query.
symbol : ConstrainedStrValue
Symbol to get data for.
Returns
-------
CommandOutput
results: List[Data]
Serializable results.
provider: Optional[PROVIDERS]
Provider name.
warnings: Optional[List[Warning_]]
List of warnings.
error: Optional[Error]
Caught exceptions.
chart: Optional[Chart]
Chart object.
StockQuote
----------
symbol : str
Symbol of the company.
name : Optional[str]
The name of the company.
price : Optional[float]
The current trading price of the stock.
changes_percentage : Optional[float]
The change percentage of the stock price.
change : Optional[float]
The change of the stock price.
day_low : Optional[float]
The lowest price of the stock in the current trading day.
day_high : Optional[float]
The highest price of the stock in the current trading day.
year_high : Optional[float]
The highest price of the stock in the last 52 weeks.
year_low : Optional[float]
The lowest price of the stock in the last 52 weeks.
market_cap : Optional[float]
The market cap of the company.
price_avg50 : Optional[float]
The 50 days average price of the stock.
price_avg200 : Optional[float]
The 200 days average price of the stock.
volume : Optional[int]
The volume of the stock in the current trading day.
avg_volume : Optional[int]
The average volume of the stock in the last 10 trading days.
exchange : Optional[str]
The exchange the stock is traded on.
open : Optional[float]
The opening price of the stock in the current trading day.
previous_close : Optional[float]
The previous closing price of the stock.
eps : Optional[float]
The earnings per share of the stock.
pe : Optional[float]
The price earnings ratio of the stock.
earnings_announcement : Optional[str]
The earnings announcement date of the stock.
shares_outstanding : Optional[int]
The number of shares outstanding of the stock.
date : Optional[datetime]
The timestamp of the stock quote.
fmp
===
Parameters
----------
All fields are standardized.
StockQuote
----------
All fields are standardized.""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
@@ -735,10 +843,116 @@ class CLASS_stocks(Container):
@filter_call
@validate_arguments
def search(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Search a specific stock ticker for analysis."""
def info(
self,
symbol: typing.Annotated[
str, OpenBBCustomParameter(description="Symbol to get data for.")
],
chart: bool = False,
provider: Optional[Literal["cboe"]] = None,
**kwargs
) -> CommandOutput[BaseModel]:
"""Get general price and performance metrics of a stock.
openbb
======
Parameters
----------
provider: Literal[cboe]
The provider to use for the query.
symbol : ConstrainedStrValue
Symbol to get data for.
Returns
-------
CommandOutput
results: List[Data]
Serializable results.
provider: Optional[PROVIDERS]
Provider name.
warnings: Optional[List[Warning_]]
List of warnings.
error: Optional[Error]
Caught exceptions.
chart: Optional[Chart]
Chart object.
StockInfo
---------
symbol : str
The ticker symbol.
name : str
The name associated with the ticker symbol.
price : float
The last price of the stock.
open : Optional[float]
The opening price of the stock.
high : Optional[float]
The high price of the current trading day.
low : Optional[float]
The low price of the current trading day.
close : Optional[float]
The closing price of the stock.
change : Optional[float]
The change in price over the current trading period.
change_percent : Optional[float]
The % change in price over the current trading period.
previous_close : Optional[float]
The previous closing price of the stock.
cboe
====
Parameters
----------
All fields are standardized.
StockInfo
---------
type : Optional[str]
The type of asset.
tick : Optional[str]
Whether the last sale was an up or down tick.
bid : Optional[float]
The current bid price.
bid_size : Optional[float]
The bid lot size.
ask : Optional[float]
The current ask price.
ask_size : Optional[float]
The ask lot size.
volume : Optional[float]
The stock volume for the current trading day.
iv_thirty : Optional[float]
The 30-day implied volatility of the stock.
iv_thirty_change : Optional[float]
The change in 30-day implied volatility of the stock.
last_trade_timestamp : Optional[datetime]
The last trade timestamp for the stock.
iv_thirty_one_year_high : Optional[float]
The 1-year high of implied volatility.
hv_thirty_one_year_high : Optional[float]
The 1-year high of realized volatility.
iv_thirty_one_year_low : Optional[float]
The 1-year low of implied volatility.
hv_thirty_one_year_low : Optional[float]
The 1-year low of realized volatility.
iv_sixty_one_year_high : Optional[float]
The 60-day high of implied volatility.
hv_sixty_one_year_high : Optional[float]
The 60-day high of realized volatility.
iv_sixty_one_year_low : Optional[float]
The 60-day low of implied volatility.
hv_sixty_one_year_low : Optional[float]
The 60-day low of realized volatility.
iv_ninety_one_year_high : Optional[float]
The 90-day high of implied volatility.
hv_ninety_one_year_high : Optional[float]
The 90-day high of realized volatility.""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,

View File

@@ -1,6 +1,5 @@
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
import typing
from typing import Literal, Optional
from pydantic import BaseModel, validate_arguments
@@ -23,7 +22,7 @@ class CLASS_stocks_ca(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[BaseModel]:
"""Company peers.

View File

@@ -134,7 +134,7 @@ class CLASS_stocks_dd(Container):
] = 100,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""SEC Filings.

View File

@@ -53,7 +53,7 @@ class CLASS_stocks_fa(Container):
] = 12,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Balance Sheet.
@@ -142,10 +142,7 @@ class CLASS_stocks_fa(Container):
deferred_revenue : Optional[int]
Accrued income taxes, other deferred revenue
short_term_debt : Optional[int]
Short-term borrowings, Long-term debt due within one year, Operating lease obligations due within one year,
Finance lease obligations due within one year
Short-term borrowings, Long-term debt due within one year, Operating lease obligations due within one year, Finance lease obligations due within one year
current_liabilities : Optional[int]
None
long_term_debt : Optional[int]
@@ -290,7 +287,7 @@ class CLASS_stocks_fa(Container):
] = 10,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Balance Sheet Statement Growth.
@@ -457,7 +454,7 @@ class CLASS_stocks_fa(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Show Dividend Calendar for a given start and end dates.
@@ -557,7 +554,7 @@ class CLASS_stocks_fa(Container):
] = 12,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Cash Flow Statement.
@@ -753,7 +750,7 @@ class CLASS_stocks_fa(Container):
] = 10,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Cash Flow Statement Growth.
@@ -893,7 +890,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Executive Compensation.
@@ -999,7 +996,7 @@ class CLASS_stocks_fa(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Stock Split Calendar.
@@ -1117,7 +1114,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Historical Dividends.
@@ -1223,7 +1220,7 @@ class CLASS_stocks_fa(Container):
] = 50,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Earnings Calendar.
@@ -1315,7 +1312,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Number of Employees.
@@ -1448,7 +1445,7 @@ class CLASS_stocks_fa(Container):
] = 30,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Analyst Estimates.
@@ -1663,7 +1660,7 @@ class CLASS_stocks_fa(Container):
] = 12,
chart: bool = False,
provider: Optional[Literal["fmp", "polygon"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Income Statement.
@@ -1883,7 +1880,7 @@ class CLASS_stocks_fa(Container):
] = "annually",
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Income Statement Growth.
@@ -2057,7 +2054,7 @@ class CLASS_stocks_fa(Container):
] = 0,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Stock Insider Trading.
@@ -2177,7 +2174,7 @@ class CLASS_stocks_fa(Container):
] = None,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Institutional Ownership.
@@ -2272,21 +2269,15 @@ class CLASS_stocks_fa(Container):
last_total_calls : int
Total number of call options contracts traded for Apple Inc. on the previous reporting date.
total_calls_change : int
Change in the total number of call options contracts traded between the current and previous reporting dates.
Change in the total number of call options contracts traded between the current and previous reporting dates.
total_puts : int
Total number of put options contracts traded for Apple Inc. on the specified date.
last_total_puts : int
Total number of put options contracts traded for Apple Inc. on the previous reporting date.
total_puts_change : int
Change in the total number of put options contracts traded between the current and previous reporting dates.
Change in the total number of put options contracts traded between the current and previous reporting dates.
put_call_ratio : float
The put-call ratio, which is the ratio of the total number of put options to call options.
The put-call ratio, which is the ratio of the total number of put options to call options traded on the specified date.
last_put_call_ratio : float
The put-call ratio on the previous reporting date.
put_call_ratio_change : float
@@ -2358,7 +2349,7 @@ class CLASS_stocks_fa(Container):
] = 100,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Key Metrics.
@@ -2555,7 +2546,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Key Executives.
@@ -2673,7 +2664,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[BaseModel]:
"""Company Overview.
@@ -2824,7 +2815,7 @@ class CLASS_stocks_fa(Container):
] = 0,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Stock Ownership.
@@ -2979,7 +2970,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Price Target Consensus.
@@ -3060,7 +3051,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Price Target.
@@ -3164,7 +3155,7 @@ class CLASS_stocks_fa(Container):
] = 12,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Extensive set of ratios over time.
@@ -3399,7 +3390,7 @@ class CLASS_stocks_fa(Container):
] = "flat",
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Revenue Geographic.
@@ -3500,7 +3491,7 @@ class CLASS_stocks_fa(Container):
] = "flat",
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Revenue Business Line.
@@ -3647,7 +3638,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Share Statistics.
@@ -3730,7 +3721,7 @@ class CLASS_stocks_fa(Container):
],
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Historical Stock Splits.
@@ -3838,7 +3829,7 @@ class CLASS_stocks_fa(Container):
] = 1,
chart: bool = False,
provider: Optional[Literal["fmp"]] = None,
**kwargs,
**kwargs
) -> CommandOutput[typing.List]:
"""Earnings Call Transcript.

View File

@@ -1,13 +1,13 @@
### 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
from openbb_core.app.model.command_output import CommandOutput
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
from openbb_core.app.static.container import Container
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
@@ -17,11 +17,13 @@ class CLASS_stocks_options(Container):
@validate_arguments
def chains(
self,
symbol: str,
symbol: typing.Annotated[
str, OpenBBCustomParameter(description="Symbol to get data for.")
],
chart: bool = False,
provider: Optional[Literal["cboe"]] = None,
**kwargs
) -> CommandOutput[typing.List]:
) -> CommandOutput[BaseModel]:
"""Get the complete options chain for a ticker.
@@ -116,7 +118,7 @@ class CLASS_stocks_options(Container):
changePercent : float
The change, in percent, of the option.
lastTradeTimestamp : datetime
The last trade timestamp of the option."""
The last trade timestamp of the option.""" # noqa: E501
inputs = filter_inputs(
provider_choices={
"provider": provider,
@@ -152,46 +154,12 @@ class CLASS_stocks_options(Container):
return filter_output(o)
@filter_call
@validate_arguments
def expirations(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Return options expirations.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/expirations",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def grhist(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Plot option greek history.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/grhist",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def hist(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Get historical data for a single option contract."""
"""Get historical data for a single option contract.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
@@ -220,46 +188,12 @@ class CLASS_stocks_options(Container):
return filter_output(o)
@filter_call
@validate_arguments
def last_price(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Return last price of an option.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/last_price",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def oi(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Plot option open interest.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/oi",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def pcr(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Display historical rolling put/call ratio for ticker over a defined window."""
"""Display historical rolling put/call ratio for ticker over a defined window.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
@@ -287,54 +221,3 @@ class CLASS_stocks_options(Container):
).output
return filter_output(o)
@filter_call
@validate_arguments
def voi(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Plot volume and open interest.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/voi",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def vol(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Plot volume.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/vol",
**inputs,
).output
return filter_output(o)
@filter_call
@validate_arguments
def vsurf(
self, chart: bool = False
) -> CommandOutput[openbb_core.app.model.results.empty.Empty]:
"""Show 3D volatility surface.""" # noqa: E501
inputs = filter_inputs(
chart=chart,
)
o = self._command_runner_session.run(
"/stocks/options/vsurf",
**inputs,
).output
return filter_output(o)

View File

@@ -1,20 +1,18 @@
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
from openbb_core.app.static.container import Container
from openbb_core.app.model.command_output import CommandOutput
import typing
from typing import List, Literal, Optional, Union
import openbb_provider
import pandas
import datetime
import pydantic
import pydantic.types
from pydantic import validate_arguments
from inspect import Parameter
from typing import List, Dict, Union, Optional, Literal
from openbb_core.app.utils import df_to_basemodel
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
import openbb_core.app.model.results.empty
import pydantic.types
import typing
from openbb_core.app.model.command_output import CommandOutput
from openbb_core.app.static.container import Container
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
class CLASS_ta(Container):
@@ -54,12 +52,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
List of data with the indicator applied.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -106,12 +104,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
List of data with the indicator applied.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -163,12 +161,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
List of data with the indicator applied.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -216,12 +214,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
List of data with the indicator applied.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -272,12 +270,12 @@ class CLASS_ta(Container):
-------
CommandOutput[List[Data]]
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -299,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,
)
@@ -360,14 +358,14 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> from openbb import obb
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
>>> bbands = obb.ta.bbands(
>>> data=stock_data.results, target="close", length=50, std=2, mamode="sma", offset=0
>>> )
"""
Examples
--------
>>> from openbb import obb
>>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp")
>>> 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,
@@ -391,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,
)
@@ -441,12 +439,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -503,12 +501,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -562,12 +560,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -619,12 +617,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -674,12 +672,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -700,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,
)
@@ -755,12 +753,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -813,12 +811,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -872,12 +870,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -913,23 +911,23 @@ class CLASS_ta(Container):
trading signals. Ichimoku Kinko Hyo translates into "one look equilibrium chart". With
one look, chartists can identify the trend and look for potential signals within that trend.
Parameters
----------
data : List[Data]
List of data to be used for the calculation.
index : str, optional
Index column name to use with `data`, by default "date".
conversion : PositiveInt, optional
Number of periods for the conversion line, by default 9.
base : PositiveInt, optional
Number of periods for the base line, by default 26.
lagging : PositiveInt, optional
Number of periods for the lagging span, by default 52.
offset : PositiveInt, optional
Number of periods for the offset, by default 26.
lookahead : bool, optional
drops the Chikou Span Column to prevent potential data leak
"""
Parameters
----------
data : List[Data]
List of data to be used for the calculation.
index : str, optional
Index column name to use with `data`, by default "date".
conversion : PositiveInt, optional
Number of periods for the conversion line, by default 9.
base : PositiveInt, optional
Number of periods for the base line, by default 26.
lagging : PositiveInt, optional
Number of periods for the lagging span, by default 52.
offset : PositiveInt, optional
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,
@@ -977,12 +975,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1034,12 +1032,12 @@ class CLASS_ta(Container):
-------
CommandOutput[List[Data]]
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1088,12 +1086,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The calculated data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1123,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.
@@ -1145,12 +1143,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The WMA data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1195,11 +1193,11 @@ class CLASS_ta(Container):
scalar : PositiveFloat, optional
The scalar of the CCI, by default 0.015.
Returns
-------
CommandOutput[List[Data]]
The CCI data.
"""
Returns
-------
CommandOutput[List[Data]]
The CCI data.
""" # noqa: E501
inputs = filter_inputs(
data=data,
index=index,
@@ -1254,12 +1252,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The RSI data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1282,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,
)
@@ -1331,12 +1329,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The Stochastic Oscillator data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1358,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,
)
@@ -1409,12 +1407,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The Keltner Channels data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1462,12 +1460,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The COG data.
Examples
--------
>>> 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)
"""
Examples
--------
>>> 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,
@@ -1545,12 +1543,12 @@ class CLASS_ta(Container):
CommandOutput[List[Data]]
The cones data.
Examples
--------
>>> 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")
"""
Examples
--------
>>> 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,
@@ -1613,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,