hummingbot icon indicating copy to clipboard operation
hummingbot copied to clipboard

Available Balance is Wrong for Gate.io

Open cheemeng opened this issue 3 years ago • 8 comments

Describe the bug After placing an order, the available balance is not updated. Causes problems with subsequent orders. Was working in 1.4.0

Steps To Reproduce

  1. create any new pure market making bot.
  2. select gate.io as the connector
  3. start the bot

Screenshots v1.4.0 The 2 levels of orders use up all available asset, so the balance of VSP should be 0 (Correct) image

v1.5.0 The available VSP balance remains unchanged (Bug) image

Release version 1.5.0

Attachments No log or config needed. Happens with any pairs.

Optional: your discord username: SoothsayerX#4696

cheemeng avatar Jul 07 '22 19:07 cheemeng

Setup PMM with multiple orders using gateio and issue is present on Hummingbot version 1.5.0 and development branch. We noticed from our testing that the available balance on status command is not updating based on the created orders. While monitoring the issue, we also noticed that for every 2mins the client would only then update the available balance.

On the screen recording below every 2mins the order would only update the available balance on status. Initially the bot create 2 orders each side and after the said interval, it updates the available balance using the previously set of orders resulting to orders being created using the remaining balance.

https://user-images.githubusercontent.com/73840223/178018553-334dac8a-2149-4e8b-ae25-9909af31af02.mp4

rapcmia avatar Jul 08 '22 15:07 rapcmia

Upon testing Dev1.6.0 with PMM strategy, it has been observed that the available balance does adjust.

https://user-images.githubusercontent.com/99257257/180376073-2397bbe8-e981-42d8-ab38-876824e7d4ad.mp4

arnelhbot avatar Jul 22 '22 06:07 arnelhbot

To replicate you could try to run the bot for ~5-10 minutes and check orders creation and available balance

nikspz avatar Jul 29 '22 08:07 nikspz

Severity: P2 Bounty: 50,000 (https://hummingbot.org/maintenance/bugs/) Rationale: Bug related to certified exchange

JeremyKono avatar Aug 22 '22 01:08 JeremyKono

Spoke to @aarmoa about this issue. This may not be a bug, since Gate total and available balances are updated via REST not WS since they don't have a WS balances endpoint. Therefore, there may be some delays in calculating Available Balance.

fengtality avatar Aug 24 '22 01:08 fengtality

I review the code, and we have updates via ws for the balance

cardosofede avatar Sep 02 '22 05:09 cardosofede

Assigning this pr to @cardosofede. Thank you for your contribution!

JeremyKono avatar Sep 05 '22 02:09 JeremyKono

Fixed with Fix/gate io wrong available balance https://github.com/hummingbot/hummingbot/pull/5679 Will create separate issue for delay in Total balance

upd:Issue for total balance: https://github.com/hummingbot/hummingbot/issues/5756

nikspz avatar Sep 21 '22 12:09 nikspz

Fix for available balance issue has been deployed on development and upcoming version 1.8.0

rapcmia avatar Sep 30 '22 04:09 rapcmia