mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 10:51:57 +00:00
Top100docs (#3436)
This commit is contained in:
@@ -28,6 +28,11 @@ def get_news(
|
||||
-------
|
||||
articles: pd.DataFrame
|
||||
term to search on the news articles
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.news()
|
||||
"""
|
||||
# Necessary for installer so that it can locate the correct certificates for
|
||||
# API calls and https
|
||||
|
||||
@@ -684,6 +684,11 @@ def get_aggregated_macro_data(
|
||||
A DataFrame with the requested macro data of all chosen countries,
|
||||
A dictionary containing the units of each country's parameter (e.g. EUR),
|
||||
A string denomination which can be Trillions, Billions, Millions, Thousands
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> macro_df = openbb.economy.macro()
|
||||
"""
|
||||
|
||||
if end_date is None:
|
||||
@@ -756,6 +761,11 @@ def get_treasuries(
|
||||
-------
|
||||
treasury_data: pd.Dataframe
|
||||
Holds data of the selected types and maturities
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.economy.treasury()
|
||||
"""
|
||||
|
||||
if end_date is None:
|
||||
|
||||
@@ -268,6 +268,11 @@ def get_yield_curve(
|
||||
Tuple[pd.DataFrame, datetime]
|
||||
Dataframe of yields and maturities,
|
||||
Date for which the yield curve is obtained
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> ycrv_df = openbb.economy.ycrv()
|
||||
"""
|
||||
fredapi_client = Fred(cfg.API_FRED_KEY)
|
||||
fred_series = {
|
||||
|
||||
@@ -66,6 +66,11 @@ def market_overview() -> pd.DataFrame:
|
||||
-------
|
||||
overview: pd.DataFrame
|
||||
Dataframe containing name, price, net change and percent change
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> ov_df = openbb.economy.overview()
|
||||
"""
|
||||
url = (
|
||||
"https://www.wsj.com/market-data?id=%7B%22application%22%3A%22WSJ%22%2C%22instruments%22%3A%5B%7B%22symbol%22"
|
||||
@@ -107,6 +112,11 @@ def top_commodities() -> pd.DataFrame:
|
||||
-------
|
||||
commodities: pd.DataFrame
|
||||
Dataframe containing name, price, net change and percent change
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> fut_df = openbb.economy.futures()
|
||||
"""
|
||||
url = (
|
||||
"https://www.wsj.com/market-data/commodities?id=%7B%22application%22%3A%22WSJ%22%2C%22instruments%22%3A%5B%7"
|
||||
|
||||
@@ -700,6 +700,12 @@ def get_indices(
|
||||
-------
|
||||
pd.Dataframe
|
||||
Dataframe with historical data on selected indices.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.economy.available_indices()
|
||||
>>> openbb.economy.index(["^GSPC", "sp400"])
|
||||
"""
|
||||
|
||||
indices_data: pd.DataFrame = pd.DataFrame()
|
||||
|
||||
@@ -24,6 +24,11 @@ def get_data(symbol: str) -> pd.DataFrame:
|
||||
-------
|
||||
pd.DataFrame
|
||||
DataFrame of fundamental data
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.stocks.fa.data("IWV")
|
||||
"""
|
||||
d_finviz_stock = finviz.get_stock(symbol)
|
||||
df_fa = pd.DataFrame.from_dict(d_finviz_stock, orient="index", columns=["Values"])
|
||||
|
||||
@@ -33,6 +33,11 @@ def get_put_call_ratio(
|
||||
-------
|
||||
pd.DataFrame
|
||||
Put call ratio
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> pcr_df = openbb.stocks.options.pcr("B")
|
||||
"""
|
||||
|
||||
if start_date is None:
|
||||
|
||||
@@ -28,6 +28,11 @@ def unusual_options(limit: int = 100) -> Tuple[pd.DataFrame, pd.Timestamp]:
|
||||
-------
|
||||
Tuple[pd.DataFrame, pd.Timestamp]
|
||||
Dataframe containing options information, Timestamp indicated when data was updated from website
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> unu_df = openbb.stocks.options.unu()
|
||||
"""
|
||||
pages = np.arange(0, limit // 20 + 1)
|
||||
data_list = []
|
||||
|
||||
@@ -122,6 +122,11 @@ def search(
|
||||
The limit of companies shown.
|
||||
export : str
|
||||
Export data
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.stocks.search(country="united states", exchange_country="Germany")
|
||||
"""
|
||||
kwargs: Dict[str, Any] = {"exclude_exchanges": False}
|
||||
if country:
|
||||
@@ -499,6 +504,11 @@ def display_candle(
|
||||
Flag to display raw data, by default False
|
||||
yscale: str
|
||||
Linear or log for yscale
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> openbb.stocks.candle("AAPL")
|
||||
"""
|
||||
|
||||
if start_date is None:
|
||||
@@ -792,6 +802,11 @@ def load_ticker(
|
||||
DataFrame
|
||||
A Panda's data frame with columns Open, High, Low, Close, Adj Close, Volume,
|
||||
date_id, OC-High, OC-Low.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from openbb_terminal.sdk import openbb
|
||||
>>> msft_df = openbb.stocks.load("MSFT")
|
||||
"""
|
||||
df_data = yf.download(ticker, start=start_date, end=end_date, progress=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user