Balance Limit – Hummingbot Foundation



Updated on version 0.35.0

Sets the amount limit on how much assets Hummingbot can use in an exchange or wallet. This can be useful when running multiple bots on different trading pairs with same tokens e.g. running a BTC-USDT pair and another bot on ETH-USDT using the same account.

How It Works

You can set how much of a particular token the bot can use by running the command balance limit [exchange] [asset] [amount]. You can disable this feature by editing it in the global config file and set it to -1. While setting it to 0 will initially not place any order for a specific asset until a trade is executed to accumulate the said asset.

For example:

>>>  balance limit binance USDT 100
Limit for USDT on binance exchange set to 100.0

Run the balance command again or balance limit to confirm the limit has been applied.

>>>  balance
Updating balances, please wait...

binance:
     Asset    Amount     Limit
       BNB    0.0000         -
       BTC    0.0000         -
       ETH    0.0000         -
     TFUEL    0.0187         -
     THETA    0.5880         -
      USDC    0.0090         -
      USDT  158.8197  100.0000
       XRP    0.8440         -
       XZC    0.0076         -
>>>  balance limit
Balance Limits per exchange...

binance
    Asset     Limit
     USDT  100.0000

Example Scenario

Create pure market making strategy, run config to view the whole configuration.

config

Run balance limit binance ETH 0.0513 to set the balance limit to 0.0513 ETH. Run balance limit binance USDT 30 to set the balance limit to 30 USDT. Both ETH and USDT value is equivalent to $30.

run balance

Each order is 0.0188 equivalent to $11.20

order amount

Sell order gets filled. USDT available balance is now 30.1657

sell filled

Another sell order gets filled, the available balance now shows 41.2069. Plus the open buy order, the “usable” balance on USDT is now at around $52.

sell filled2

After the two sell orders gets filled the remaining available balance in ETH is 0.0137 equivalent to $8.17. It means that after the next order_refresh_time it won’t create sell order because the minimum order amount is $11.

buy order

buy order1

Same process as the scenario above. After the two buy orders gets filled the remaining available balance in USDT is 7.5317 equivalent to $7.53. It means that after the next order_refresh_time it won’t create buy order because the minimum order amount is $11.

buy order buy

buy order buy1


Last update:
2021-12-15

This Post Has 28 Comments

  1. gate io

    After reading your article, I have some doubts about gate.io. I don’t know if you’re free? I would like to consult with you. thank you.

  2. I am a student of BAK College. The recent paper competition gave me a lot of headaches, and I checked a lot of information. Finally, after reading your article, it suddenly dawned on me that I can still have such an idea. grateful. But I still have some questions, hope you can help me.

  3. 20bet

    Your article gave me a lot of inspiration, I hope you can explain your point of view in more detail, because I have some doubts, thank you.

  4. Phone Tracker Free

    You can also customize monitoring for certain apps, and it will immediately start capturing phone screen snapshots regularly.

  5. Phone Tracker Free

    Through the parental monitoring program, parents can pay attention to their children’s mobile phone activities and monitor WhatsApp messages more easily and conveniently. The application software runs silently in the background of the target device, recording conversation messages, emoticons, multimedia files, photos, and videos. It applies to every device running on Android and iOS systems.

  6. Inscription à Binance

    Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  7. Prijava

    Your article helped me a lot, is there any more related content? Thanks!

  8. binance

    I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  9. Kode Binance

    Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

  10. missav

    Spot oon with this write-up, I absolutely belive thyis website neds a great deal more
    attention.I’ll probabgly be regurning tto see more, thanks for the advice!

  11. mymissav.cc

    Liink exchange is nothin else except it is juat placing the other person’s web ssite lijnk on your page at suitablke
    lace and othyer person will alszo ddo saqme forr you.

Leave a Reply