diff --git a/openbb_terminal/cryptocurrency/onchain/bitquery_view.py b/openbb_terminal/cryptocurrency/onchain/bitquery_view.py index b58010bd4704..1c7f20940c24 100644 --- a/openbb_terminal/cryptocurrency/onchain/bitquery_view.py +++ b/openbb_terminal/cryptocurrency/onchain/bitquery_view.py @@ -7,6 +7,9 @@ from openbb_terminal.cryptocurrency.dataframe_helpers import ( lambda_very_long_number_formatter, ) +from openbb_terminal.cryptocurrency.dataframe_helpers import ( + prettify_column_names, +) from openbb_terminal.cryptocurrency.onchain import bitquery_model from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table @@ -58,7 +61,10 @@ def display_dex_trades( if not df.empty: df_data = df.copy() - df[["tradeAmount", "trades"]] = df[["tradeAmount", "trades"]].applymap( + column_names = ["tradeAmount", "trades"] + column_names = prettify_column_names(column_names) + + df[column_names] = df[column_names].applymap( lambda x: lambda_very_long_number_formatter(x) ) @@ -184,7 +190,11 @@ def display_dex_volume_for_token( ) if not df.empty: df_data = df.copy() - df[["tradeAmount", "trades"]] = df[["tradeAmount", "trades"]].applymap( + + column_names = ["tradeAmount", "trades"] + column_names = prettify_column_names(column_names) + + df[column_names] = df[column_names].applymap( lambda x: lambda_very_long_number_formatter(x) ) @@ -238,9 +248,13 @@ def display_ethereum_unique_senders( df = bitquery_model.get_ethereum_unique_senders(interval, limit, sortby, ascend) if not df.empty: - df[["uniqueSenders", "transactions", "maximumGasPrice"]] = df[ - ["uniqueSenders", "transactions", "maximumGasPrice"] - ].applymap(lambda x: lambda_very_long_number_formatter(x)) + + column_names = ["uniqueSenders", "transactions", "maximumGasPrice"] + column_names = prettify_column_names(column_names) + + df[column_names] = df[column_names].applymap( + lambda x: lambda_very_long_number_formatter(x) + ) df_data = df.copy() @@ -295,7 +309,11 @@ def display_most_traded_pairs( ) if not df.empty: df_data = df.copy() - df[["tradeAmount", "trades"]] = df[["tradeAmount", "trades"]].applymap( + + column_names = ["tradeAmount", "trades"] + column_names = prettify_column_names(column_names) + + df[column_names] = df[column_names].applymap( lambda x: lambda_very_long_number_formatter(x) ) diff --git a/openbb_terminal/cryptocurrency/onchain/onchain_controller.py b/openbb_terminal/cryptocurrency/onchain/onchain_controller.py index 96892bcdd863..249ffb40f0ac 100644 --- a/openbb_terminal/cryptocurrency/onchain/onchain_controller.py +++ b/openbb_terminal/cryptocurrency/onchain/onchain_controller.py @@ -307,8 +307,8 @@ def call_hr(self, other_args: List[str]): display_hashrate( symbol=ns_parser.coin, interval=ns_parser.interval, - since=int(datetime.timestamp(ns_parser.since)), - until=int(datetime.timestamp(ns_parser.until)), + start_date=int(datetime.timestamp(ns_parser.since)), + end_date=int(datetime.timestamp(ns_parser.until)), export=ns_parser.export, ) @@ -1107,7 +1107,7 @@ def call_tv(self, other_args: List[str]): if ns_parser: bitquery_view.display_dex_volume_for_token( - token=ns_parser.coin, + symbol=ns_parser.coin, trade_amount_currency=ns_parser.vs, top=ns_parser.limit, sortby=ns_parser.sortby, diff --git a/openbb_terminal/cryptocurrency/onchain/whale_alert_view.py b/openbb_terminal/cryptocurrency/onchain/whale_alert_view.py index b1157975c97f..0917d987121b 100644 --- a/openbb_terminal/cryptocurrency/onchain/whale_alert_view.py +++ b/openbb_terminal/cryptocurrency/onchain/whale_alert_view.py @@ -45,7 +45,11 @@ def display_whales_transactions( Export dataframe data to csv,json,xlsx file """ - df = whale_alert_model.get_whales_transactions(min_value, sortby, ascend) + df = whale_alert_model.get_whales_transactions( + min_value=min_value, + sortby=sortby, + ascend=ascend, + ) if df.empty: console.print("Failed to retrieve data.")