Skip to content

Commit

Permalink
[Bug] Crypto/DeFi/pools - Error: display_uni_pools() got an unexpecte…
Browse files Browse the repository at this point in the history
…d keyword argument 'descend' (OpenBB-finance#2539)

* fix ascend arg

* black
  • Loading branch information
montezdesousa authored Sep 13, 2022
1 parent a73c123 commit e3b4ff5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openbb_terminal/cryptocurrency/defi/graph_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def display_recently_added(

@log_start_end(log=logger)
def display_uni_pools(
top: int = 20, sortby: str = "volumeUSD", ascend: bool = False, export: str = ""
top: int = 20, sortby: str = "volumeUSD", descend: bool = True, export: str = ""
) -> None:
"""Displays uniswap pools by volume.
[Source: https://thegraph.com/en/]
Expand All @@ -168,13 +168,15 @@ def display_uni_pools(
sortby: str
Key by which to sort data. The table can be sorted by every of its columns
(see https://bit.ly/3ORagr1 then press ctrl-enter or execute the query).
ascend: bool
descend: bool
Flag to sort data descending
export : str
Export dataframe data to csv,json,xlsx file
"""

df = graph_model.get_uni_pools_by_volume().sort_values(by=sortby, ascending=ascend)
df = graph_model.get_uni_pools_by_volume().sort_values(
by=sortby, ascending=not (descend)
)
df["volumeUSD"] = df["volumeUSD"].apply(
lambda x: lambda_very_long_number_formatter(x)
)
Expand Down

0 comments on commit e3b4ff5

Please sign in to comment.