Skip to content

Commit

Permalink
Out of the box crypto report (#3794)
Browse files Browse the repository at this point in the history
* working crypto report

* fixing news

* fixing the condtion's logic

* changed the load source

* added example

* trying to get rid of binance
  • Loading branch information
hjoaquim authored Dec 16, 2022
1 parent 6112658 commit af7334a
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 163 deletions.
5 changes: 5 additions & 0 deletions openbb_terminal/cryptocurrency/cryptocurrency_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ def load(
-------
pd.DataFrame
Dataframe consisting of price and volume data
Examples
--------
>>> from openbb_terminal.sdk import openbb
>>> openbb.crypto.load(symbol="btc",to_symbol="usd",start_date="2019-01-01",source="YahooFinance")
"""
if isinstance(interval, int):
interval = str(interval)
Expand Down
13 changes: 12 additions & 1 deletion openbb_terminal/cryptocurrency/due_diligence/messari_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ def get_marketcap_dominance(
-------
pd.DataFrame
market dominance percentage over time
Examples
--------
>>> from openbb_terminal.sdk import openbb
>>> mcapdom_df = openbb.crypto.dd.mcapdom(symbol="BTC")
"""

if start_date is None:
Expand All @@ -110,13 +115,14 @@ def get_marketcap_dominance(
if end_date is None:
end_date = datetime.now().strftime("%Y-%m-%d")

df, _ = get_messari_timeseries(
messari_timeseries = get_messari_timeseries(
symbol=symbol,
end_date=end_date,
start_date=start_date,
interval=interval,
timeseries_id="mcap.dom",
)
df, _ = messari_timeseries if messari_timeseries else (pd.DataFrame(), "")
return df


Expand Down Expand Up @@ -653,6 +659,11 @@ def get_fundraising(
Sales rounds,
Treasury Accounts,
Metric Value launch details
Examples
--------
>>> from openbb_terminal.sdk import openbb
>>> fundraise = openbb.crypto.dd.fr(symbol="BTC")
"""

url = base_url2 + f"assets/{symbol}/profile"
Expand Down
Loading

0 comments on commit af7334a

Please sign in to comment.