hummingbot / dashboard

Application that helps you create, backtest, deploy, and manage Hummingbot instances
Apache License 2.0
188 stars 124 forks source link

Error StreamlitAPIException when checking balance in Portfolio page when account has 0 balance #161

Open lanphan opened 4 months ago

lanphan commented 4 months ago

Describe the bug

Portfolio page doesn't show "Select tokens" field, instead it shows error below:

StreamlitAPIException: Every Multiselect default value must exist in options

Traceback:
File "/home/dashboard/frontend/pages/orchestration/portfolio/app.py", line 84, in <module>
    tokens_available = st.multiselect("Select Tokens", token_options, token_options)

Steps to reproduce

  1. Open Dashboard
  2. Following instruction from https://hummingbot.org/installation/hummingbot-deploy/quickstart/#managing-instances , after entering Credential (binance perpetual), got error in Portfolio page
Screenshot 2024-07-06 at 09 45 13 Screenshot 2024-07-06 at 09 45 20

Release version

latest version

Type of installation

Docker

Attach required files

No response

lanphan commented 4 months ago

I think I found the root cause of this bug: when my sub account doesn't have any asset, Portfoilo page will show that bug. After I deposit some USDT, the error has gone, and show "Select tokens: USDT" in my Portfolio page. --> I think we need to update code to cover case when user account doesn't have any asset

rapcmia commented 4 months ago

I am able to reproduce this issue after creating a sub account with no assets (tests on kucoin and binance sub accounts) image

rapcmia commented 3 months ago

Moved github ticket to dashboard repo

saltypalo commented 2 months ago
Screenshot 2024-08-22 at 14 44 54

Hey, having the same issue but with Hyperliquid, and the thing is, I already have balance on my account, and still encountering it. So effectively, can't use Hyperliquid with Hbot right now

nikspz commented 2 months ago

hyperliquid_perpetual is okay. image

AD-QT commented 2 months ago

I am also getting the same error in OKX. I have some non-usdt coins in the account. How do we resolve this ?

image

nikspz commented 2 months ago

I am also getting the same error in OKX. I have some non-usdt coins in the account. How do we resolve this ?

image

Can't reproduce for both okx and okx_perpetual

image image image

May be you have 0 balance on exchange

image image