mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
fixes for mypy 1.0
This commit is contained in:
2
.github/workflows/linting.yml
vendored
2
.github/workflows/linting.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- run: |
|
||||
pip install bandit black codespell mypy==0.982 safety pylint==2.15.2 packaging==22 ruff==0.0.243
|
||||
pip install bandit black codespell mypy==1.0.0 safety pylint==2.15.2 ruff==0.0.243
|
||||
pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
|
||||
- run: bandit -x ./tests -r . || true
|
||||
- run: black --diff --check .
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
key: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }}
|
||||
restore-keys: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- run: pip install bandit black codespell mypy==0.982 safety pylint==2.15.2 packaging==22 ruff==0.0.243
|
||||
- run: pip install bandit black codespell mypy==1.0.0 safety pylint==2.15.2 ruff==0.0.243
|
||||
- run: pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
|
||||
- run: bandit -x ./tests -r . || true
|
||||
- run: black --diff --check .
|
||||
|
||||
@@ -3,7 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.alternative import hackernews_view
|
||||
@@ -26,7 +26,7 @@ class AlternativeDataController(BaseController):
|
||||
PATH = "/alternative/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ __docformat__ = "numpy"
|
||||
import argparse
|
||||
import logging
|
||||
import pathlib
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -33,7 +33,7 @@ class CovidController(BaseController):
|
||||
PATH = "/alternative/covid/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ def display_covid_ov(
|
||||
raw: bool = False,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
plot: bool = True,
|
||||
) -> None:
|
||||
"""Prints table showing historical cases and deaths by country.
|
||||
@@ -184,7 +184,7 @@ def display_covid_stat(
|
||||
raw: bool = False,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
plot: bool = True,
|
||||
) -> None:
|
||||
"""Prints table showing historical cases and deaths by country.
|
||||
@@ -241,7 +241,7 @@ def display_case_slopes(
|
||||
threshold: int = 10000,
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing countries with the highest case slopes.
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.alternative.hackernews_model import get_stories
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -12,7 +13,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_stories(limit: int = 10, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_stories(
|
||||
limit: int = 10, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""View top stories from HackerNews.
|
||||
Parameters
|
||||
----------
|
||||
|
||||
@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
|
||||
def display_star_history(
|
||||
repo: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots repo summary [Source: https://api.github.com].
|
||||
@@ -79,7 +79,7 @@ def display_top_repos(
|
||||
categories: str = "",
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots repo summary [Source: https://api.github.com].
|
||||
@@ -139,7 +139,9 @@ def display_top_repos(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_repo_summary(repo: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_repo_summary(
|
||||
repo: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing repo summary [Source: https://api.github.com].
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -3,7 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.alternative.oss import github_view, runa_model, runa_view
|
||||
@@ -29,7 +29,7 @@ class OSSController(BaseController):
|
||||
PATH = "/alternative/oss/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def display_rossindex(
|
||||
show_growth: bool = True,
|
||||
chart_type: str = "stars",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots list of startups from ross index [Source: https://runacap.com/]
|
||||
|
||||
@@ -4,7 +4,7 @@ __docformat__ = "numpy"
|
||||
import argparse
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.alternative.realestate import landRegistry_view
|
||||
@@ -40,7 +40,7 @@ class RealEstateController(BaseController):
|
||||
CHOICES_GENERATION = True
|
||||
# FILE_PATH = os.path.join(os.path.dirname(__file__), "README.md")
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Construct Data."""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ def display_sentiment_analysis(
|
||||
symbol: str,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Sentiment analysis from FinBrain. Prints table if raw is True. [Source: FinBrain]
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -16,7 +17,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_FINNHUB_KEY"])
|
||||
def display_sentiment_stats(ticker: str, export: str = "", sheet_name: str = None):
|
||||
def display_sentiment_stats(
|
||||
ticker: str, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""
|
||||
Prints Sentiment stats which displays buzz, news score, articles last week, articles weekly average,
|
||||
bullish vs bearish percentages, sector average bullish percentage, and sector average news score
|
||||
|
||||
@@ -27,7 +27,7 @@ def display_mentions(
|
||||
symbol: str,
|
||||
start_date: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots weekly bars of stock's interest over time. other users watchlist. [Source: Google].
|
||||
@@ -97,7 +97,7 @@ def display_correlation_interest(
|
||||
data: pd.DataFrame,
|
||||
words: List[str],
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots interest over time of words/sentences versus stock price. [Source: Google].
|
||||
@@ -173,7 +173,7 @@ def display_regions(
|
||||
symbol: str,
|
||||
limit: int = 5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots bars of regions based on stock's interest. [Source: Google].
|
||||
@@ -229,7 +229,7 @@ def display_regions(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_queries(
|
||||
symbol: str, limit: int = 5, export: str = "", sheet_name: str = None
|
||||
symbol: str, limit: int = 5, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Prints table showing top related queries with this stock's query. [Source: Google].
|
||||
|
||||
@@ -268,7 +268,7 @@ def display_queries(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_rise(
|
||||
symbol: str, limit: int = 10, export: str = "", sheet_name: str = None
|
||||
symbol: str, limit: int = 10, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Prints top rising related queries with this stock's query. [Source: Google].
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ def display_popular_tickers(
|
||||
post_limit: int = 50,
|
||||
subreddits: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Prints table showing latest popular tickers. [Source: Reddit].
|
||||
|
||||
@@ -412,7 +412,7 @@ def display_redditsent(
|
||||
subreddits: str = "all",
|
||||
display: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Reddit sentiment about a search term. Prints table showing if display is True.
|
||||
|
||||
@@ -27,7 +27,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_inference(
|
||||
symbol: str, limit: int = 100, export: str = "", sheet_name: str = None
|
||||
symbol: str, limit: int = 100, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Prints Inference sentiment from past n tweets.
|
||||
|
||||
@@ -92,7 +92,7 @@ def display_sentiment(
|
||||
n_days_past: int = 2,
|
||||
compare: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots sentiments from symbol
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.common import feedparser_model
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -18,7 +19,7 @@ def display_news(
|
||||
sources: str = "",
|
||||
limit: int = 5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
sort: str = "published",
|
||||
):
|
||||
"""Plots news for a given term and source. [Source: Feedparser]
|
||||
|
||||
@@ -23,7 +23,7 @@ def display_news(
|
||||
show_newest: bool = True,
|
||||
sources: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing news for a given term. [Source: NewsAPI]
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ def lambda_color_red(val: Any) -> str:
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_summary(
|
||||
data: pd.DataFrame, export: str = "", sheet_name: str = None
|
||||
data: pd.DataFrame, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing summary statistics
|
||||
|
||||
@@ -164,7 +164,7 @@ def display_cdf(
|
||||
target: str,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Cumulative Distribution Function
|
||||
@@ -665,7 +665,7 @@ def display_seasonal(
|
||||
target: str,
|
||||
multiplicative: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots seasonal decomposition data
|
||||
@@ -810,7 +810,7 @@ def display_seasonal(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_normality(
|
||||
data: pd.DataFrame, target: str, export: str = "", sheet_name: str = None
|
||||
data: pd.DataFrame, target: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing normality statistics
|
||||
|
||||
@@ -852,7 +852,7 @@ def display_unitroot(
|
||||
fuller_reg: str = "c",
|
||||
kpss_reg: str = "c",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Prints table showing unit root test calculations
|
||||
|
||||
@@ -895,7 +895,7 @@ def display_raw(
|
||||
ascend: bool = False,
|
||||
limit: int = 20,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing raw stock data
|
||||
|
||||
@@ -956,7 +956,7 @@ def display_line(
|
||||
markers_lines: Optional[List[datetime]] = None,
|
||||
markers_scatter: Optional[List[datetime]] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Display line plot of data
|
||||
|
||||
@@ -29,7 +29,7 @@ def display_mean_std(
|
||||
symbol: str = "",
|
||||
window: int = 14,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots mean std deviation
|
||||
@@ -142,7 +142,7 @@ def display_spread(
|
||||
symbol: str = "",
|
||||
window: int = 14,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots rolling spread
|
||||
@@ -257,7 +257,7 @@ def display_quantile(
|
||||
window: int = 14,
|
||||
quantile: float = 0.5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots rolling quantile
|
||||
@@ -356,7 +356,7 @@ def display_skew(
|
||||
target: str,
|
||||
window: int = 14,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots rolling skew
|
||||
@@ -443,7 +443,7 @@ def display_kurtosis(
|
||||
target: str,
|
||||
window: int = 14,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots rolling kurtosis
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
__docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
from typing import Any, Tuple
|
||||
from typing import Any, Optional, Tuple
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -17,8 +17,8 @@ logger = logging.getLogger(__name__)
|
||||
def calculate_fib_levels(
|
||||
data: pd.DataFrame,
|
||||
limit: int = 120,
|
||||
start_date: Any = None,
|
||||
end_date: Any = None,
|
||||
start_date: Optional[Any] = None,
|
||||
end_date: Optional[Any] = None,
|
||||
) -> Tuple[pd.DataFrame, pd.Timestamp, pd.Timestamp, float, float]:
|
||||
"""Calculate Fibonacci levels
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def fibonacci_retracement(
|
||||
end_date: Optional[Union[str, None]] = None,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Calculated fibonacci retracement levels
|
||||
|
||||
@@ -36,7 +36,7 @@ def display_cci(
|
||||
scalar: float = 0.0015,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots CCI Indicator
|
||||
@@ -131,7 +131,7 @@ def display_macd(
|
||||
n_signal: int = 9,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots MACD signal
|
||||
@@ -226,7 +226,7 @@ def display_rsi(
|
||||
drift: int = 1,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots RSI Indicator
|
||||
@@ -316,7 +316,7 @@ def display_stoch(
|
||||
slowkperiod: int = 3,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots stochastic oscillator signal
|
||||
@@ -415,7 +415,7 @@ def display_fisher(
|
||||
window: int = 14,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Fisher Indicator
|
||||
@@ -510,7 +510,7 @@ def display_cg(
|
||||
window: int = 14,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots center of gravity Indicator
|
||||
@@ -583,7 +583,7 @@ def display_clenow_momentum(
|
||||
symbol: str = "",
|
||||
window: int = 90,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Prints table and plots clenow momentum
|
||||
|
||||
@@ -33,12 +33,12 @@ register_matplotlib_converters()
|
||||
@log_start_end(log=logger)
|
||||
def view_ma(
|
||||
data: pd.Series,
|
||||
window: List[int] = None,
|
||||
window: Optional[List[int]] = None,
|
||||
offset: int = 0,
|
||||
ma_type: str = "EMA",
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots MA technical indicator
|
||||
@@ -144,7 +144,7 @@ def view_vwap(
|
||||
offset: int = 0,
|
||||
interval: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots VWMA technical indicator
|
||||
|
||||
@@ -33,7 +33,7 @@ def display_adx(
|
||||
drift: int = 1,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots ADX indicator
|
||||
@@ -125,7 +125,7 @@ def display_aroon(
|
||||
scalar: int = 100,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Aroon indicator
|
||||
|
||||
@@ -32,7 +32,7 @@ def display_bbands(
|
||||
n_std: float = 2,
|
||||
mamode: str = "sma",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots bollinger bands
|
||||
@@ -118,7 +118,7 @@ def display_donchian(
|
||||
upper_length: int = 20,
|
||||
lower_length: int = 20,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots donchian channels
|
||||
@@ -204,7 +204,7 @@ def view_kc(
|
||||
offset: int = 0,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots Keltner Channels Indicator
|
||||
@@ -302,7 +302,7 @@ def display_atr(
|
||||
mamode: str = "sma",
|
||||
offset: int = 0,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots ATR
|
||||
|
||||
@@ -29,7 +29,7 @@ def display_ad(
|
||||
use_open: bool = False,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots AD technical indicator
|
||||
@@ -148,7 +148,7 @@ def display_adosc(
|
||||
use_open: bool = False,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots AD Osc Indicator
|
||||
@@ -255,7 +255,7 @@ def display_obv(
|
||||
data: pd.DataFrame,
|
||||
symbol: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots OBV technical indicator
|
||||
|
||||
@@ -62,14 +62,16 @@ class TrailMap:
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def load_csv(cls, path: Path = None) -> Dict[str, Dict[str, str]]:
|
||||
def load_csv(cls, path: Optional[Path] = None) -> Dict[str, Dict[str, str]]:
|
||||
path = path or cls.MAP_PATH
|
||||
df = pd.read_csv(path, keep_default_na=False)
|
||||
df.set_index("trail", inplace=True)
|
||||
return df.to_dict(orient="index")
|
||||
|
||||
@classmethod
|
||||
def save_csv(cls, map_dict: Dict[str, Dict[str, str]], path: Path = None) -> None:
|
||||
def save_csv(
|
||||
cls, map_dict: Dict[str, Dict[str, str]], path: Optional[Path] = None
|
||||
) -> None:
|
||||
path = path or cls.MAP_PATH
|
||||
df = pd.DataFrame.from_dict(data=map_dict, orient="index")
|
||||
df.index.name = "trail"
|
||||
|
||||
@@ -15,7 +15,7 @@ def get_timestamp_from_x_days(x: int) -> float:
|
||||
|
||||
def get_expired_file_list(directory: Path, before_timestamp: float) -> List[Path]:
|
||||
expired_files = list()
|
||||
if directory.exists and directory.is_dir():
|
||||
if directory.exists and directory.is_dir(): # type: ignore
|
||||
for file in directory.iterdir():
|
||||
if file.is_file() and file.lstat().st_mtime < before_timestamp:
|
||||
expired_files.append(file)
|
||||
|
||||
@@ -5,7 +5,7 @@ __docformat__ = "numpy"
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency import cryptocurrency_helpers, pyth_model, pyth_view
|
||||
@@ -82,7 +82,7 @@ class CryptoController(CryptoBaseController):
|
||||
FILE_PATH = os.path.join(os.path.dirname(__file__), "README.md")
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency import crypto_models
|
||||
from openbb_terminal.helper_funcs import export_data, print_rich_table
|
||||
@@ -10,7 +11,7 @@ def find(
|
||||
key: str = "symbol",
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Find similar coin by coin name,symbol or id.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ YF_CURRENCY = [
|
||||
|
||||
|
||||
def check_datetime(
|
||||
ck_date: Union[datetime, Union[str, None]] = None, start: bool = True
|
||||
ck_date: Optional[Union[datetime, Union[str, None]]] = None, start: bool = True
|
||||
) -> datetime:
|
||||
"""Checks if given argument is string and attempts to convert to datetime.
|
||||
|
||||
@@ -487,11 +487,11 @@ def load_from_yahoofinance(
|
||||
|
||||
def load(
|
||||
symbol: str,
|
||||
start_date: Union[datetime, Union[str, None]] = None,
|
||||
start_date: Optional[Union[datetime, Union[str, None]]] = None,
|
||||
interval: Union[str, int] = "1440",
|
||||
exchange: str = "binance",
|
||||
to_symbol: str = "usdt",
|
||||
end_date: Union[datetime, Union[str, None]] = None,
|
||||
end_date: Optional[Union[datetime, Union[str, None]]] = None,
|
||||
source: str = "CCXT",
|
||||
) -> pd.DataFrame:
|
||||
"""Load crypto currency to get data for
|
||||
@@ -815,9 +815,9 @@ def plot_chart(
|
||||
|
||||
def plot_candles( # pylint: disable=too-many-arguments
|
||||
symbol: str,
|
||||
data: pd.DataFrame = None,
|
||||
start_date: Union[datetime, Union[str, None]] = None,
|
||||
end_date: Union[datetime, Union[str, None]] = None,
|
||||
data: Optional[pd.DataFrame] = None,
|
||||
start_date: Optional[Union[datetime, Union[str, None]]] = None,
|
||||
end_date: Optional[Union[datetime, Union[str, None]]] = None,
|
||||
interval: Union[str, int] = "1440",
|
||||
exchange: str = "binance",
|
||||
to_symbol: str = "usdt",
|
||||
|
||||
@@ -24,7 +24,7 @@ def display_defi_vaults(
|
||||
ascend: bool = True,
|
||||
link: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing Top DeFi Vaults - pools of funds with an assigned strategy which main goal is to
|
||||
maximize returns of its crypto assets. [Source: https://coindix.com/]
|
||||
|
||||
@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
|
||||
def display_anchor_data(
|
||||
address: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
show_transactions: bool = False,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
|
||||
@@ -5,7 +5,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.defi import (
|
||||
@@ -62,7 +62,7 @@ class DefiController(BaseController):
|
||||
PATH = "/crypto/defi/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.dataframe_helpers import (
|
||||
lambda_very_long_number_formatter,
|
||||
@@ -23,7 +24,7 @@ def display_uni_tokens(
|
||||
sortby: str = "index",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing tokens trade-able on Uniswap DEX.
|
||||
[Source: https://thegraph.com/en/]
|
||||
@@ -73,7 +74,7 @@ def display_uni_tokens(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_uni_stats(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_uni_stats(export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""Prints table showing base statistics about Uniswap DEX. [Source: https://thegraph.com/en/]
|
||||
[Source: https://thegraph.com/en/]
|
||||
|
||||
@@ -113,7 +114,7 @@ def display_recently_added(
|
||||
sortby: str = "created",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing Lastly added pairs on Uniswap DEX.
|
||||
[Source: https://thegraph.com/en/]
|
||||
@@ -179,7 +180,7 @@ def display_uni_pools(
|
||||
sortby: str = "volumeUSD",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing uniswap pools by volume.
|
||||
[Source: https://thegraph.com/en/]
|
||||
@@ -232,7 +233,7 @@ def display_last_uni_swaps(
|
||||
sortby: str = "timestamp",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing last swaps done on Uniswap
|
||||
[Source: https://thegraph.com/en/]
|
||||
|
||||
@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
|
||||
def display_grouped_defi_protocols(
|
||||
limit: int = 50,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots top dApps (in terms of TVL) grouped by chain.
|
||||
@@ -101,7 +101,7 @@ def display_defi_protocols(
|
||||
ascend: bool = False,
|
||||
description: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing information about listed DeFi protocols, their current TVL and changes to it in
|
||||
the last hour/day/week. [Source: https://docs.llama.fi/api]
|
||||
@@ -137,7 +137,7 @@ def display_defi_protocols(
|
||||
def display_historical_tvl(
|
||||
dapps: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots historical TVL of different dApps
|
||||
@@ -196,7 +196,7 @@ def display_historical_tvl(
|
||||
def display_defi_tvl(
|
||||
limit: int = 5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots historical values of the total sum of TVLs from all listed protocols.
|
||||
|
||||
@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
|
||||
def display_luna_circ_supply_change(
|
||||
days: int = 30,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
supply_type: str = "lunaSupplyChallengeStats",
|
||||
limit: int = 5,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
|
||||
@@ -4,6 +4,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.defi import substack_model
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -14,7 +15,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_newsletters(
|
||||
limit: int = 10, export: str = "", sheet_name: str = None
|
||||
limit: int = 10, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing DeFi related substack newsletters.
|
||||
[Source: substack.com]
|
||||
|
||||
@@ -28,7 +28,7 @@ def display_terra_asset_history(
|
||||
asset: str = "",
|
||||
address: str = "",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots the 30-day history of specified asset in terra address
|
||||
@@ -84,7 +84,7 @@ def display_terra_asset_history(
|
||||
@log_start_end(log=logger)
|
||||
def display_anchor_yield_reserve(
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots the 30-day history of the Anchor Yield Reserve.
|
||||
|
||||
@@ -30,7 +30,10 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_account_staking_info(
|
||||
address: str = "", limit: int = 10, export: str = "", sheet_name: str = None
|
||||
address: str = "",
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing staking info for provided terra account address [Source: https://fcd.terra.dev/swagger]
|
||||
|
||||
@@ -67,7 +70,7 @@ def display_validators(
|
||||
sortby: str = "votingPower",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing information about terra validators [Source: https://fcd.terra.dev/swagger]
|
||||
|
||||
@@ -117,7 +120,7 @@ def display_gov_proposals(
|
||||
sortby: str = "id",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing terra blockchain governance proposals list [Source: https://fcd.terra.dev/swagger]
|
||||
|
||||
@@ -154,7 +157,7 @@ def display_account_growth(
|
||||
cumulative: bool = False,
|
||||
limit: int = 90,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots terra blockchain account growth history [Source: https://fcd.terra.dev/swagger]
|
||||
@@ -222,7 +225,7 @@ def display_account_growth(
|
||||
def display_staking_ratio_history(
|
||||
limit: int = 90,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots terra blockchain staking ratio history [Source: https://fcd.terra.dev/v1]
|
||||
@@ -271,7 +274,7 @@ def display_staking_ratio_history(
|
||||
def display_staking_returns_history(
|
||||
limit: int = 90,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots terra blockchain staking returns history [Source: https://fcd.terra.dev/swagger]
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.discovery import coinmarketcap_model
|
||||
from openbb_terminal.decorators import check_api_key, log_start_end
|
||||
@@ -19,7 +20,7 @@ def display_cmc_top_coins(
|
||||
sortby: str = "CMC_Rank",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing top n coins. [Source: CoinMarketCap]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import openbb_terminal.cryptocurrency.discovery.coinpaprika_model as paprika
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -20,7 +21,7 @@ def display_search_results(
|
||||
sortby: str = "id",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing Search over CoinPaprika. [Source: CoinPaprika]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -19,7 +20,10 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_top_nfts(
|
||||
limit: int = 10, sortby: str = "", export: str = "", sheet_name: str = None
|
||||
limit: int = 10,
|
||||
sortby: str = "",
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing top nft collections [Source: https://dappradar.com/]
|
||||
|
||||
@@ -63,7 +67,10 @@ def display_top_nfts(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_top_games(
|
||||
limit: int = 10, export: str = "", sheet_name: str = None, sortby: str = ""
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
sortby: str = "",
|
||||
) -> None:
|
||||
"""Prints table showing top blockchain games [Source: https://dappradar.com/]
|
||||
|
||||
@@ -102,7 +109,10 @@ def display_top_games(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_top_dexes(
|
||||
limit: int = 10, export: str = "", sheet_name: str = None, sortby: str = ""
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
sortby: str = "",
|
||||
) -> None:
|
||||
"""Prints table showing top decentralized exchanges [Source: https://dappradar.com/]
|
||||
|
||||
@@ -141,7 +151,10 @@ def display_top_dexes(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_top_dapps(
|
||||
limit: int = 10, export: str = "", sheet_name: str = None, sortby: str = ""
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
sortby: str = "",
|
||||
) -> None:
|
||||
"""Prints table showing top decentralized exchanges [Source: https://dappradar.com/]
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ __docformat__ = "numpy"
|
||||
# pylint: disable=R0904, C0302, W0622, C0201
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.discovery import (
|
||||
@@ -48,7 +48,7 @@ class DiscoveryController(BaseController):
|
||||
PATH = "/crypto/disc/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from pandas.plotting import register_matplotlib_converters
|
||||
|
||||
@@ -37,7 +38,7 @@ def display_coins(
|
||||
limit: int = 250,
|
||||
sortby: str = "Symbol",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
ascend: bool = False,
|
||||
) -> None:
|
||||
"""Prints table showing top coins [Source: CoinGecko]
|
||||
@@ -104,7 +105,7 @@ def display_gainers(
|
||||
limit: int = 20,
|
||||
sortby: str = "market_cap_rank",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing Largest Gainers - coins which gain the most in given period. [Source: CoinGecko]
|
||||
|
||||
@@ -150,7 +151,7 @@ def display_losers(
|
||||
interval: str = "1h",
|
||||
limit: int = 20,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
sortby: str = "Market Cap Rank",
|
||||
) -> None:
|
||||
"""Prints table showing Largest Losers - coins which lost the most in given period of time. [Source: CoinGecko]
|
||||
@@ -193,7 +194,7 @@ def display_losers(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_trending(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_trending(export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""Prints table showing trending coins [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -26,7 +26,7 @@ def display_order_book(
|
||||
limit: int = 100,
|
||||
to_symbol: str = "USDT",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots order book for currency. [Source: Binance]
|
||||
@@ -66,7 +66,10 @@ def display_order_book(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_balance(
|
||||
from_symbol: str, to_symbol: str = "USDT", export: str = "", sheet_name: str = None
|
||||
from_symbol: str,
|
||||
to_symbol: str = "USDT",
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing account holdings for asset. [Source: Binance]
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ def display_order_book(
|
||||
symbol: str,
|
||||
to_symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots order book for a coin in a given exchange
|
||||
@@ -69,7 +69,7 @@ def display_trades(
|
||||
to_symbol: str,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Prints table showing trades for a coin in a given exchange
|
||||
[Source: https://docs.ccxt.com/en/latest/manual.html]
|
||||
|
||||
@@ -23,7 +23,7 @@ register_matplotlib_converters()
|
||||
def display_order_book(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots a list of available currency pairs for trading. [Source: Coinbase]
|
||||
@@ -55,7 +55,7 @@ def display_trades(
|
||||
limit: int = 20,
|
||||
side: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing last N trades for chosen trading pair. [Source: Coinbase]
|
||||
|
||||
@@ -86,7 +86,10 @@ def display_trades(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_candles(
|
||||
symbol: str, interval: str = "24hour", export: str = "", sheet_name: str = None
|
||||
symbol: str,
|
||||
interval: str = "24hour",
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing candles for chosen trading pair and time interval. [Source: Coinbase]
|
||||
|
||||
@@ -116,7 +119,9 @@ def display_candles(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_stats(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_stats(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing 24 hr stats for the product. Volume is in base currency units.
|
||||
Open, high and low are in quote currency units. [Source: Coinbase]
|
||||
|
||||
|
||||
@@ -28,7 +28,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_COINGLASS_KEY"])
|
||||
def display_funding_rate(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_funding_rate(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Plots funding rate by exchange for a certain cryptocurrency
|
||||
[Source: https://coinglass.github.io/API-Reference/]
|
||||
|
||||
@@ -56,7 +58,7 @@ def display_funding_rate(symbol: str, export: str = "", sheet_name: str = None)
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_COINGLASS_KEY"])
|
||||
def display_open_interest(
|
||||
symbol: str, interval: int = 0, export: str = "", sheet_name: str = None
|
||||
symbol: str, interval: int = 0, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Plots open interest by exchange for a certain cryptocurrency
|
||||
[Source: https://coinglass.github.io/API-Reference/]
|
||||
@@ -91,7 +93,9 @@ def display_open_interest(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_COINGLASS_KEY"])
|
||||
def display_liquidations(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_liquidations(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Plots liquidation per day data for a certain cryptocurrency
|
||||
[Source: https://coinglass.github.io/API-Reference/#liquidation-chart]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from pandas.plotting import register_matplotlib_converters
|
||||
|
||||
@@ -89,7 +90,7 @@ def display_twitter(
|
||||
sortby: str = "date",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing twitter timeline for given coin id. Not more than last 50 tweets [Source: CoinPaprika]
|
||||
|
||||
@@ -138,7 +139,7 @@ def display_events(
|
||||
ascend: bool = False,
|
||||
links: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing all events for given coin id. [Source: CoinPaprika]
|
||||
|
||||
@@ -192,7 +193,7 @@ def display_exchanges(
|
||||
sortby: str = "adjusted_volume_24h_share",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing all exchanges for given coin id. [Source: CoinPaprika]
|
||||
|
||||
@@ -241,7 +242,7 @@ def display_markets(
|
||||
ascend: bool = True,
|
||||
links: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing all markets for given coin id. [Source: CoinPaprika]
|
||||
|
||||
@@ -296,7 +297,7 @@ def display_price_supply(
|
||||
from_symbol: str = "BTC",
|
||||
to_symbol: str = "USD",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing ticker information for single coin [Source: CoinPaprika]
|
||||
|
||||
@@ -337,7 +338,7 @@ def display_price_supply(
|
||||
def display_basic(
|
||||
symbol: str = "BTC",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing basic information for coin. Like:
|
||||
name, symbol, rank, type, description, platform, proof_type, contract, tags, parent.
|
||||
|
||||
@@ -26,7 +26,7 @@ def display_news(
|
||||
limit: int = 25,
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing recent posts from CryptoPanic news aggregator platform.
|
||||
[Source: https://cryptopanic.com/]
|
||||
|
||||
@@ -5,7 +5,7 @@ __docformat__ = "numpy"
|
||||
import argparse
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency import cryptocurrency_helpers
|
||||
@@ -118,7 +118,7 @@ class DueDiligenceController(CryptoBaseController):
|
||||
self,
|
||||
symbol=None,
|
||||
source=None,
|
||||
queue: List[str] = None,
|
||||
queue: Optional[List[str]] = None,
|
||||
):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
@@ -40,7 +40,7 @@ def display_crypto_sentiment_analysis(
|
||||
symbol: str,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Sentiment analysis from FinBrain for Cryptocurrencies
|
||||
|
||||
@@ -37,7 +37,7 @@ def display_active_addresses(
|
||||
end_date: Optional[str] = None,
|
||||
interval: str = "24h",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots active addresses of a certain symbol over time
|
||||
@@ -102,7 +102,7 @@ def display_non_zero_addresses(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots addresses with non-zero balance of a certain symbol
|
||||
@@ -166,7 +166,7 @@ def display_exchange_net_position_change(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots 30d change of the supply held in exchange wallets.
|
||||
@@ -250,7 +250,7 @@ def display_exchange_balances(
|
||||
end_date: Optional[str] = None,
|
||||
percentage: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots total amount of coins held on exchange addresses in units and percentage.
|
||||
@@ -333,7 +333,7 @@ def display_hashrate(
|
||||
end_date: Optional[str] = None,
|
||||
interval: str = "24h",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots dataframe with mean hashrate of btc or eth blockchain and symbol price.
|
||||
|
||||
@@ -56,7 +56,7 @@ def display_messari_timeseries_list(
|
||||
query: str = "",
|
||||
only_free: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing messari timeseries list
|
||||
[Source: https://messari.io/]
|
||||
@@ -114,7 +114,7 @@ def display_messari_timeseries(
|
||||
end_date: Optional[str] = None,
|
||||
interval: str = "1d",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots messari timeseries
|
||||
@@ -193,7 +193,7 @@ def display_marketcap_dominance(
|
||||
end_date: Optional[str] = None,
|
||||
interval: str = "1d",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots market dominance of a coin over time
|
||||
@@ -256,7 +256,9 @@ def display_marketcap_dominance(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_MESSARI_KEY"])
|
||||
def display_links(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_links(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing coin links
|
||||
[Source: https://messari.io/]
|
||||
|
||||
@@ -297,7 +299,7 @@ def display_roadmap(
|
||||
ascend: bool = True,
|
||||
limit: int = 5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots coin roadmap
|
||||
@@ -399,7 +401,7 @@ def display_roadmap(
|
||||
def display_tokenomics(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Plots coin tokenomics
|
||||
@@ -485,7 +487,7 @@ def display_tokenomics(
|
||||
def display_project_info(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing project info
|
||||
[Source: https://messari.io/]
|
||||
@@ -527,7 +529,7 @@ def display_project_info(
|
||||
def display_investors(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing coin investors
|
||||
[Source: https://messari.io/]
|
||||
@@ -575,7 +577,7 @@ def display_investors(
|
||||
def display_team(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing coin team
|
||||
[Source: https://messari.io/]
|
||||
@@ -623,7 +625,7 @@ def display_team(
|
||||
def display_governance(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing coin governance
|
||||
[Source: https://messari.io/]
|
||||
@@ -662,7 +664,7 @@ def display_governance(
|
||||
def display_fundraising(
|
||||
symbol: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Display coin fundraising
|
||||
|
||||
@@ -25,7 +25,7 @@ def display_coin_potential_returns(
|
||||
limit: Optional[int] = None,
|
||||
price: Optional[int] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing potential returns of a certain coin. [Source: CoinGecko]
|
||||
|
||||
@@ -58,7 +58,9 @@ def display_coin_potential_returns(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_info(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_info(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing basic information about loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -92,7 +94,9 @@ def display_info(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_web(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_web(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing found websites corresponding to loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -126,7 +130,9 @@ def display_web(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_social(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_social(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing social media corresponding to loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -156,7 +162,9 @@ def display_social(symbol: str, export: str = "", sheet_name: str = None) -> Non
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_dev(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_dev(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing developers data for loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -188,7 +196,10 @@ def display_dev(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_ath(
|
||||
symbol: str, currency: str = "usd", export: str = "", sheet_name: str = None
|
||||
symbol: str,
|
||||
currency: str = "usd",
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing all time high data for loaded coin. [Source: CoinGecko]
|
||||
|
||||
@@ -218,7 +229,10 @@ def display_ath(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_atl(
|
||||
symbol: str, currency: str = "usd", export: str = "", sheet_name: str = None
|
||||
symbol: str,
|
||||
currency: str = "usd",
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing all time low data for loaded coin. [Source: CoinGecko]
|
||||
|
||||
@@ -247,7 +261,9 @@ def display_atl(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_score(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_score(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing different kind of scores for loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -278,7 +294,7 @@ def display_score(symbol: str, export: str = "", sheet_name: str = None) -> None
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_bc(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_bc(symbol: str, export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""Prints table showing urls to blockchain explorers. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -306,7 +322,9 @@ def display_bc(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_market(symbol: str, export: str = "", sheet_name: str = None) -> None:
|
||||
def display_market(
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Prints table showing market data for loaded coin. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -28,7 +28,7 @@ def display_github_activity(
|
||||
end_date: Optional[str] = None,
|
||||
interval: str = "1d",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Returns a list of github activity for a given coin and time interval.
|
||||
|
||||
@@ -31,7 +31,7 @@ def display_fundamental_metric_from_project_over_time(
|
||||
metric: str,
|
||||
project: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Plots fundamental metric from a project over time [Source: Token Terminal]
|
||||
@@ -107,7 +107,9 @@ def display_fundamental_metric_from_project_over_time(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_TOKEN_TERMINAL_KEY"])
|
||||
def display_description(project: str, export: str = "", sheet_name: str = None):
|
||||
def display_description(
|
||||
project: str, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Prints description from a project [Source: Token Terminal]
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import Optional, List
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.nft import (
|
||||
@@ -32,7 +32,7 @@ class NFTController(BaseController):
|
||||
PATH = "/crypto/nft/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def display_collections(
|
||||
show_sales: bool = False,
|
||||
limit: int = 5,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display NFT collections. [Source: https://nftpricefloor.com/]
|
||||
|
||||
@@ -96,7 +96,7 @@ def display_floor_price(
|
||||
slug: str,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
raw: bool = False,
|
||||
):
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.dataframe_helpers import (
|
||||
lambda_very_long_number_formatter,
|
||||
@@ -25,7 +26,7 @@ def display_dex_trades(
|
||||
sortby: str = "tradeAmount",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing Trades on Decentralized Exchanges aggregated by DEX or Month
|
||||
[Source: https://graphql.bitquery.io/]
|
||||
@@ -91,7 +92,7 @@ def display_daily_volume_for_given_pair(
|
||||
sortby: str = "date",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing daily volume for given pair
|
||||
[Source: https://graphql.bitquery.io/]
|
||||
@@ -166,7 +167,7 @@ def display_dex_volume_for_token(
|
||||
sortby: str = "tradeAmount",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing token volume on different Decentralized Exchanges.
|
||||
[Source: https://graphql.bitquery.io/]
|
||||
@@ -232,7 +233,7 @@ def display_ethereum_unique_senders(
|
||||
sortby: str = "date",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing number of unique ethereum addresses which made a transaction in given time interval
|
||||
[Source: https://graphql.bitquery.io/]
|
||||
@@ -295,7 +296,7 @@ def display_most_traded_pairs(
|
||||
sortby: str = "tradeAmount",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing most traded crypto pairs on given decentralized exchange in chosen time period.
|
||||
[Source: https://graphql.bitquery.io/]
|
||||
@@ -357,7 +358,7 @@ def display_spread_for_crypto_pair(
|
||||
sortby: str = "date",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Prints table showing an average bid and ask prices, average spread for given crypto pair for chosen
|
||||
time period. [Source: https://graphql.bitquery.io/]
|
||||
|
||||
@@ -30,7 +30,7 @@ def display_btc_circulating_supply(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Returns BTC circulating supply [Source: https://api.blockchain.info/]
|
||||
@@ -92,7 +92,7 @@ def display_btc_confirmed_transactions(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Returns BTC confirmed transactions [Source: https://api.blockchain.info/]
|
||||
@@ -155,7 +155,7 @@ def display_btc_confirmed_transactions(
|
||||
def display_btc_single_block(
|
||||
blockhash: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Returns BTC block data. [Source: https://api.blockchain.info/]
|
||||
Parameters
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""ETH Gas Station view"""
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.onchain.ethgasstation_model import get_gwei_fees
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -11,7 +12,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_gwei_fees(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_gwei_fees(export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""Current gwei fees
|
||||
[Source: https://ethgasstation.info]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.dataframe_helpers import (
|
||||
lambda_very_long_number_formatter,
|
||||
@@ -24,7 +25,7 @@ def display_address_info(
|
||||
sortby: str = "index",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display info about tokens for given ethereum blockchain balance e.g. ETH balance,
|
||||
balance of all tokens with name and symbol. [Source: Ethplorer]
|
||||
@@ -74,7 +75,7 @@ def display_top_tokens(
|
||||
sortby: str = "rank",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display top ERC20 tokens [Source: Ethplorer]
|
||||
|
||||
@@ -121,7 +122,7 @@ def display_top_token_holders(
|
||||
sortby: str = "balance",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display info about top ERC20 token holders. [Source: Ethplorer]
|
||||
|
||||
@@ -167,7 +168,7 @@ def display_address_history(
|
||||
sortby: str = "timestamp",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display information about balance historical transactions. [Source: Ethplorer]
|
||||
|
||||
@@ -215,7 +216,7 @@ def display_token_info(
|
||||
address: str,
|
||||
social: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display info about ERC20 token. [Source: Ethplorer]
|
||||
|
||||
@@ -259,7 +260,7 @@ def display_token_info(
|
||||
def display_tx_info(
|
||||
tx_hash: str,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display info about transaction. [Source: Ethplorer]
|
||||
|
||||
@@ -297,7 +298,7 @@ def display_token_history(
|
||||
ascend: bool = False,
|
||||
hash_: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display info about token history. [Source: Ethplorer]
|
||||
|
||||
@@ -356,7 +357,7 @@ def display_token_historical_prices(
|
||||
sortby: str = "date",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display token historical prices with volume and market cap, and average price.
|
||||
[Source: Ethplorer]
|
||||
|
||||
@@ -7,7 +7,7 @@ import argparse
|
||||
import difflib
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.due_diligence.glassnode_model import (
|
||||
@@ -90,7 +90,7 @@ class OnchainController(BaseController):
|
||||
PATH = "/crypto/onchain/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
|
||||
@check_api_key(["API_SHROOM_KEY"])
|
||||
def display_daily_transactions(
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Get daily transactions for certain symbols in ethereum blockchain
|
||||
@@ -89,7 +89,7 @@ def display_dapp_stats(
|
||||
raw: bool = False,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Get daily transactions for certain symbols in ethereum blockchain
|
||||
@@ -160,7 +160,7 @@ def display_total_value_locked(
|
||||
symbol: str = "USDC",
|
||||
interval: int = 1,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.onchain import whale_alert_model
|
||||
from openbb_terminal.decorators import check_api_key, log_start_end
|
||||
@@ -25,7 +26,7 @@ def display_whales_transactions(
|
||||
ascend: bool = False,
|
||||
show_address: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display huge value transactions from major blockchains. [Source: https://docs.whale-alert.io/]
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ def display_altcoin_index(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Displays altcoin index overtime
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.overview import coinbase_model
|
||||
from openbb_terminal.decorators import check_api_key, log_start_end
|
||||
@@ -18,7 +19,7 @@ def display_trading_pairs(
|
||||
sortby: str = "quote_increment",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Displays a list of available currency pairs for trading. [Source: Coinbase]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from pandas.plotting import register_matplotlib_converters
|
||||
|
||||
@@ -71,7 +72,7 @@ CURRENCIES = [
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_global_market(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_global_market(export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""Return data frame with most important global crypto statistics like:
|
||||
market_cap_usd, volume_24h_usd, bitcoin_dominance_percentage, cryptocurrencies_number,
|
||||
market_cap_ath_value, market_cap_ath_date, volume_24h_ath_value, volume_24h_ath_date,
|
||||
@@ -109,7 +110,7 @@ def display_all_coins_market_info(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Displays basic market information for all coins from CoinPaprika API. [Source: CoinPaprika]
|
||||
|
||||
@@ -165,7 +166,7 @@ def display_all_coins_info(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Displays basic coin information for all coins from CoinPaprika API. [Source: CoinPaprika]
|
||||
|
||||
@@ -221,7 +222,7 @@ def display_all_exchanges(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""List exchanges from CoinPaprika API. [Source: CoinPaprika]
|
||||
|
||||
@@ -278,7 +279,7 @@ def display_exchange_markets(
|
||||
limit: int = 15,
|
||||
links: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Get all markets for given exchange [Source: CoinPaprika]
|
||||
|
||||
@@ -330,7 +331,7 @@ def display_exchange_markets(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_all_platforms(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_all_platforms(export: str = "", sheet_name: Optional[str] = None) -> None:
|
||||
"""List all smart contract platforms like ethereum, solana, cosmos, polkadot, kusama.
|
||||
[Source: CoinPaprika]
|
||||
|
||||
@@ -362,7 +363,7 @@ def display_contracts(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Gets all contract addresses for given platform. [Source: CoinPaprika]
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ def display_news(
|
||||
ascend: bool = False,
|
||||
links: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display recent posts from CryptoPanic news aggregator platform.
|
||||
[Source: https://cryptopanic.com/]
|
||||
|
||||
@@ -30,7 +30,7 @@ def display_btc_rainbow(
|
||||
start_date: str = "2010-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Displays bitcoin rainbow chart
|
||||
|
||||
@@ -29,7 +29,7 @@ def display_crypto_rates(
|
||||
rate_type: str = "borrow",
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Displays crypto {borrow,supply} interest rates for cryptocurrencies across several platforms
|
||||
|
||||
@@ -6,7 +6,7 @@ import argparse
|
||||
import difflib
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import (
|
||||
@@ -87,7 +87,7 @@ class OverviewController(BaseController):
|
||||
PATH = "/crypto/ov/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ def display_crypto_heatmap(
|
||||
category: str = "",
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
) -> None:
|
||||
"""Shows cryptocurrencies heatmap [Source: CoinGecko]
|
||||
@@ -146,7 +146,7 @@ def display_holdings_overview(
|
||||
symbol: str,
|
||||
show_bar: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
limit: int = 15,
|
||||
) -> None:
|
||||
"""Shows overview of public companies that holds ethereum or bitcoin. [Source: CoinGecko]
|
||||
@@ -219,7 +219,7 @@ def display_exchange_rates(
|
||||
ascend: bool = False,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of crypto, fiats, commodity exchange rates. [Source: CoinGecko]
|
||||
|
||||
@@ -258,7 +258,7 @@ def display_exchange_rates(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_global_market_info(
|
||||
pie: bool = False, export: str = "", sheet_name: str = None
|
||||
pie: bool = False, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Shows global statistics about crypto. [Source: CoinGecko]
|
||||
- market cap change
|
||||
@@ -323,7 +323,9 @@ def display_global_market_info(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_global_defi_info(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_global_defi_info(
|
||||
export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Shows global statistics about Decentralized Finances. [Source: CoinGecko]
|
||||
|
||||
Parameters
|
||||
@@ -357,7 +359,7 @@ def display_global_defi_info(export: str = "", sheet_name: str = None) -> None:
|
||||
def display_stablecoins(
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
sortby: str = "Market_Cap_[$]",
|
||||
ascend: bool = False,
|
||||
pie: bool = True,
|
||||
@@ -444,7 +446,7 @@ def display_categories(
|
||||
sortby: str = "market_cap_desc",
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
pie: bool = False,
|
||||
) -> None:
|
||||
"""Shows top cryptocurrency categories by market capitalization
|
||||
@@ -516,7 +518,7 @@ def display_exchanges(
|
||||
limit: int = 15,
|
||||
links: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of top exchanges from CoinGecko. [Source: CoinGecko]
|
||||
|
||||
@@ -566,7 +568,7 @@ def display_platforms(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of financial platforms. [Source: CoinGecko]
|
||||
|
||||
@@ -609,7 +611,7 @@ def display_products(
|
||||
ascend: bool = False,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of financial products. [Source: CoinGecko]
|
||||
|
||||
@@ -652,7 +654,7 @@ def display_indexes(
|
||||
ascend: bool = True,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of crypto indexes. [Source: CoinGecko]
|
||||
|
||||
@@ -694,7 +696,7 @@ def display_derivatives(
|
||||
ascend: bool = False,
|
||||
limit: int = 15,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Shows list of crypto derivatives. [Source: CoinGecko]
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Rekt view"""
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.overview import rekt_model
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -21,7 +22,7 @@ def display_crypto_hacks(
|
||||
ascend: bool = False,
|
||||
slug: str = "polyntwork-rekt",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display list of major crypto-related hacks. If slug is passed
|
||||
individual crypto hack is displayed instead of list of crypto hacks
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Withdrawal Fees view"""
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.overview.withdrawalfees_model import (
|
||||
get_crypto_withdrawal_fees,
|
||||
@@ -16,7 +17,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_overall_withdrawal_fees(
|
||||
limit: int = 15, export: str = "", sheet_name: str = None
|
||||
limit: int = 15, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Top coins withdrawal fees
|
||||
[Source: https://withdrawalfees.com/]
|
||||
@@ -54,7 +55,7 @@ def display_overall_withdrawal_fees(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_overall_exchange_withdrawal_fees(
|
||||
export: str = "", sheet_name: str = None
|
||||
export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Exchange withdrawal fees
|
||||
[Source: https://withdrawalfees.com/]
|
||||
@@ -90,7 +91,7 @@ def display_overall_exchange_withdrawal_fees(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_crypto_withdrawal_fees(
|
||||
symbol: str, export: str = "", sheet_name: str = None
|
||||
symbol: str, export: str = "", sheet_name: Optional[str] = None
|
||||
) -> None:
|
||||
"""Coin withdrawal fees per exchange
|
||||
[Source: https://withdrawalfees.com/]
|
||||
|
||||
@@ -3,7 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
@@ -60,7 +60,7 @@ class QaController(CryptoBaseController):
|
||||
self,
|
||||
symbol: str,
|
||||
data: pd.DataFrame,
|
||||
queue: List[str] = None,
|
||||
queue: Optional[List[str]] = None,
|
||||
):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
@@ -6,7 +6,7 @@ import argparse
|
||||
import logging
|
||||
import webbrowser
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
@@ -77,7 +77,7 @@ class TechnicalAnalysisController(CryptoBaseController):
|
||||
start: datetime,
|
||||
interval: str,
|
||||
stock: pd.DataFrame,
|
||||
queue: List[str] = None,
|
||||
queue: Optional[List[str]] = None,
|
||||
):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
@@ -5,7 +5,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.cryptocurrency.tools import tools_view
|
||||
@@ -32,7 +32,7 @@ class ToolsController(BaseController):
|
||||
PATH = "/crypto/tools/"
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.cryptocurrency.tools.tools_model import calculate_apy, calculate_il
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -18,7 +19,7 @@ def display_apy(
|
||||
compounding_times: int,
|
||||
narrative: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Displays APY value converted from APR
|
||||
|
||||
@@ -65,7 +66,7 @@ def display_il(
|
||||
initial_pool_value: int,
|
||||
narrative: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Displays Impermanent Loss in a custom liquidity pool
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import argparse
|
||||
import logging
|
||||
import os
|
||||
import subprocess # nosec
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
import openbb_terminal.config_terminal as cfg
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
@@ -37,7 +37,7 @@ class DashboardsController(BaseController):
|
||||
]
|
||||
PATH = "/dashboards/"
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
@@ -112,7 +112,7 @@ class DashboardsController(BaseController):
|
||||
|
||||
@classmethod
|
||||
def create_call_voila(
|
||||
cls, other_args: List[str], name: str, filename: str = None
|
||||
cls, other_args: List[str], name: str, filename: Optional[str] = None
|
||||
) -> None:
|
||||
filename = filename if filename else name
|
||||
|
||||
@@ -176,7 +176,7 @@ class DashboardsController(BaseController):
|
||||
|
||||
@classmethod
|
||||
def create_call_streamlit(
|
||||
cls, other_args: List[str], name: str, filename: str = None
|
||||
cls, other_args: List[str], name: str, filename: Optional[str] = None
|
||||
) -> None:
|
||||
filename = filename if filename else name
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import logging
|
||||
import os
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
@@ -108,7 +108,7 @@ class EconometricsController(BaseController):
|
||||
loaded_dataset_cols = "\n"
|
||||
list_dataset_cols: List = list()
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
self.files: List[str] = list()
|
||||
|
||||
@@ -26,9 +26,9 @@ register_matplotlib_converters()
|
||||
@log_start_end(log=logger)
|
||||
def show_options(
|
||||
datasets: Dict[str, pd.DataFrame],
|
||||
dataset_name: str = None,
|
||||
dataset_name: Optional[str] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Plot custom data
|
||||
|
||||
@@ -71,7 +71,7 @@ def show_options(
|
||||
def display_plot(
|
||||
data: Union[pd.Series, pd.DataFrame, Dict[str, pd.DataFrame]],
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
):
|
||||
"""Plot data from a dataset
|
||||
@@ -140,7 +140,7 @@ def display_norm(
|
||||
column: str = "",
|
||||
plot: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
):
|
||||
"""Determine the normality of a timeseries.
|
||||
@@ -213,7 +213,7 @@ def display_root(
|
||||
fuller_reg: str = "c",
|
||||
kpss_reg: str = "c",
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Determine the normality of a timeseries.
|
||||
|
||||
@@ -266,7 +266,7 @@ def display_granger(
|
||||
lags: int = 3,
|
||||
confidence_level: float = 0.05,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Show granger tests
|
||||
|
||||
@@ -334,7 +334,7 @@ def display_cointegration_test(
|
||||
significant: bool = False,
|
||||
plot: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
):
|
||||
"""Estimates long-run and short-run cointegration relationship for series y and x and apply
|
||||
|
||||
@@ -4,7 +4,7 @@ __docformat__ = "numpy"
|
||||
import logging
|
||||
import os
|
||||
import warnings
|
||||
from typing import Any, Dict, List, Tuple
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
import pandas as pd
|
||||
import statsmodels
|
||||
@@ -434,7 +434,9 @@ def get_fdols(Y: pd.DataFrame, X: pd.DataFrame) -> Any:
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def get_comparison(regressions: Dict, export: str = "", sheet_name: str = None):
|
||||
def get_comparison(
|
||||
regressions: Dict, export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Compare regression results between Panel Data regressions.
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -27,7 +27,7 @@ def display_panel(
|
||||
entity_effects: bool = False,
|
||||
time_effects: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Based on the regression type, this function decides what regression to run.
|
||||
|
||||
@@ -85,7 +85,7 @@ def display_dwat(
|
||||
dependent_variable: pd.Series,
|
||||
plot: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
):
|
||||
"""Show Durbin-Watson autocorrelation tests
|
||||
@@ -146,7 +146,7 @@ def display_bgod(
|
||||
model: statsmodels.regression.linear_model.RegressionResultsWrapper,
|
||||
lags: int = 3,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Show Breusch-Godfrey autocorrelation test
|
||||
|
||||
@@ -193,7 +193,7 @@ def display_bgod(
|
||||
def display_bpag(
|
||||
model: statsmodels.regression.linear_model.RegressionResultsWrapper,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Show Breusch-Pagan heteroscedasticity test
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
|
||||
def realtime_performance_sector(
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display Real-Time Performance sector. [Source: AlphaVantage]
|
||||
@@ -92,7 +92,7 @@ def display_real_gdp(
|
||||
start_year: int = 2010,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display US GDP from AlphaVantage
|
||||
@@ -151,7 +151,7 @@ def display_gdp_capita(
|
||||
start_year: int = 2010,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display US GDP per Capita from AlphaVantage
|
||||
@@ -209,7 +209,7 @@ def display_inflation(
|
||||
start_year: int = 2010,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display US Inflation from AlphaVantage
|
||||
@@ -267,7 +267,7 @@ def display_cpi(
|
||||
start_year: int = 2010,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display US consumer price index (CPI) from AlphaVantage
|
||||
@@ -328,7 +328,7 @@ def display_treasury_yield(
|
||||
start_date: str = "2010-01-01",
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display historical treasury yield for given maturity
|
||||
@@ -390,7 +390,7 @@ def display_unemployment(
|
||||
start_year: int = 2010,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display US unemployment AlphaVantage
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
from openbb_terminal.economy import commodity_model
|
||||
@@ -25,7 +26,7 @@ def format_large_numbers(num: float) -> str:
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_debt(export: str = "", sheet_name: str = None, limit: int = 20):
|
||||
def display_debt(export: str = "", sheet_name: Optional[str] = None, limit: int = 20):
|
||||
"""Displays external debt for given countries [Source: Wikipedia]
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -658,8 +658,8 @@ def get_macro_countries() -> Dict[str, str]:
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def get_aggregated_macro_data(
|
||||
parameters: list = None,
|
||||
countries: list = None,
|
||||
parameters: Optional[list] = None,
|
||||
countries: Optional[list] = None,
|
||||
transform: str = "",
|
||||
start_date: str = "1900-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
@@ -741,8 +741,8 @@ def get_aggregated_macro_data(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def get_treasuries(
|
||||
instruments: list = None,
|
||||
maturities: list = None,
|
||||
instruments: Optional[list] = None,
|
||||
maturities: Optional[list] = None,
|
||||
frequency: str = "monthly",
|
||||
start_date: str = "1900-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
|
||||
@@ -19,8 +19,8 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def show_macro_data(
|
||||
parameters: list = None,
|
||||
countries: list = None,
|
||||
parameters: Optional[list] = None,
|
||||
countries: Optional[list] = None,
|
||||
transform: str = "",
|
||||
start_date: str = "1900-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
@@ -28,7 +28,7 @@ def show_macro_data(
|
||||
raw: bool = False,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Show the received macro data about a company [Source: EconDB]
|
||||
|
||||
@@ -146,15 +146,15 @@ def show_macro_data(
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def show_treasuries(
|
||||
instruments: list = None,
|
||||
maturities: list = None,
|
||||
instruments: Optional[list] = None,
|
||||
maturities: Optional[list] = None,
|
||||
frequency: str = "monthly",
|
||||
start_date: str = "1900-01-01",
|
||||
end_date: Optional[str] = None,
|
||||
raw: bool = False,
|
||||
external_axes: Optional[List[plt.axes]] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display U.S. Treasury rates [Source: EconDB]
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from datetime import (
|
||||
date,
|
||||
datetime as dt,
|
||||
)
|
||||
from typing import Any, Dict, List
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -160,7 +160,7 @@ class EconomyController(BaseController):
|
||||
FILE_PATH = os.path.join(os.path.dirname(__file__), "README.md")
|
||||
CHOICES_GENERATION = True
|
||||
|
||||
def __init__(self, queue: List[str] = None):
|
||||
def __init__(self, queue: Optional[List[str]] = None):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.decorators import check_api_key, log_start_end
|
||||
from openbb_terminal.economy import finnhub_model
|
||||
@@ -12,7 +13,11 @@ logger = logging.getLogger(__name__)
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_FINNHUB_KEY"])
|
||||
def economy_calendar_events(
|
||||
country: str, limit: int, impact: str, export: str = "", sheet_name: str = None
|
||||
country: str,
|
||||
limit: int,
|
||||
impact: str,
|
||||
export: str = "",
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Output economy calendar impact events. [Source: Finnhub]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from PIL import Image
|
||||
|
||||
@@ -33,7 +34,7 @@ def display_valuation(
|
||||
sortby: str = "Name",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display group (sectors, industry or country) valuation data. [Source: Finviz]
|
||||
|
||||
@@ -75,7 +76,7 @@ def display_performance(
|
||||
sortby: str = "Name",
|
||||
ascend: bool = True,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""View group (sectors, industry or country) performance data. [Source: Finviz]
|
||||
|
||||
@@ -112,7 +113,9 @@ def display_performance(
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_spectrum(group: str = "sector", export: str = "", sheet_name: str = None):
|
||||
def display_spectrum(
|
||||
group: str = "sector", export: str = "", sheet_name: Optional[str] = None
|
||||
):
|
||||
"""Display finviz spectrum in system viewer [Source: Finviz]
|
||||
|
||||
Parameters
|
||||
@@ -145,7 +148,7 @@ def display_future(
|
||||
sortby: str = "ticker",
|
||||
ascend: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display table of a particular future type. [Source: Finviz]
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ def display_fred_series(
|
||||
get_data: bool = False,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display (multiple) series from https://fred.stlouisfed.org. [Source: FRED]
|
||||
@@ -191,7 +191,7 @@ def display_yield_curve(
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display yield curve based on US Treasury rates for a specified date.
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def display_spread_matrix(
|
||||
raw: bool = False,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display spread matrix. [Source: Investing.com]
|
||||
|
||||
@@ -212,7 +212,7 @@ def display_yieldcurve(
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display yield curve for specified country. [Source: Investing.com]
|
||||
|
||||
@@ -304,7 +304,7 @@ def display_economic_calendar(
|
||||
end_date: str = "",
|
||||
limit=100,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""Display economic calendar. [Source: Investing.com]
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ def get_big_mac_index(country_code: str = "USA") -> pd.DataFrame:
|
||||
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_KEY_QUANDL"])
|
||||
def get_big_mac_indices(country_codes: List[str] = None) -> pd.DataFrame:
|
||||
def get_big_mac_indices(country_codes: Optional[List[str]] = None) -> pd.DataFrame:
|
||||
"""Display Big Mac Index for given countries
|
||||
|
||||
Parameters
|
||||
|
||||
@@ -29,7 +29,7 @@ def display_economic_calendar(
|
||||
end_date: str,
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Display economic calendar for specified country between start and end dates
|
||||
|
||||
@@ -68,10 +68,10 @@ def display_economic_calendar(
|
||||
@log_start_end(log=logger)
|
||||
@check_api_key(["API_KEY_QUANDL"])
|
||||
def display_big_mac_index(
|
||||
country_codes: List[str] = None,
|
||||
country_codes: Optional[List[str]] = None,
|
||||
raw: bool = False,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
external_axes: Optional[List[plt.Axes]] = None,
|
||||
):
|
||||
"""Display Big Mac Index for given countries
|
||||
|
||||
@@ -110,7 +110,7 @@ def show_options(
|
||||
raw: str = "",
|
||||
limit: int = 10,
|
||||
export: str = "",
|
||||
sheet_name: str = None,
|
||||
sheet_name: Optional[str] = None,
|
||||
):
|
||||
"""
|
||||
The ability to plot any data coming from EconDB, FRED or Yahoo Finance.
|
||||
|
||||
@@ -3,7 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from typing import Dict, List
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
@@ -59,7 +59,7 @@ class QaController(StockBaseController):
|
||||
def __init__(
|
||||
self,
|
||||
all_economy_data: Dict,
|
||||
queue: List[str] = None,
|
||||
queue: Optional[List[str]] = None,
|
||||
):
|
||||
"""Constructor"""
|
||||
super().__init__(queue)
|
||||
|
||||
@@ -3,6 +3,7 @@ __docformat__ = "numpy"
|
||||
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
from openbb_terminal.economy import wsj_model
|
||||
@@ -13,7 +14,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_overview(export: str = "", sheet_name: str = None):
|
||||
def display_overview(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""Market overview with daily change. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
@@ -43,7 +44,7 @@ def display_overview(export: str = "", sheet_name: str = None):
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_indices(export: str = "", sheet_name: str = None):
|
||||
def display_indices(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""US indices. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
@@ -70,7 +71,7 @@ def display_indices(export: str = "", sheet_name: str = None):
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_futures(export: str = "", sheet_name: str = None):
|
||||
def display_futures(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""Futures/Commodities. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
@@ -100,7 +101,7 @@ def display_futures(export: str = "", sheet_name: str = None):
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_usbonds(export: str = "", sheet_name: str = None):
|
||||
def display_usbonds(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""US bonds. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
@@ -127,7 +128,7 @@ def display_usbonds(export: str = "", sheet_name: str = None):
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_glbonds(export: str = "", sheet_name: str = None):
|
||||
def display_glbonds(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""Global bonds. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
@@ -154,7 +155,7 @@ def display_glbonds(export: str = "", sheet_name: str = None):
|
||||
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def display_currencies(export: str = "", sheet_name: str = None):
|
||||
def display_currencies(export: str = "", sheet_name: Optional[str] = None):
|
||||
"""Display currencies. [Source: Wall St. Journal]
|
||||
|
||||
Parameters
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user