HIP-6 [DG] Fixed-Grid Strategy for Hummingbot

Author: jamesPmagic 0x4eF

Original Post Date: 6 Apr 2022

Snapshot Proposal Link

Hi all,

I would like to submit a Fixed Grid strategy for HB under the Developer Grant Proposal [HGP-6] once it is approved. I’m been working out the details of this strategy on and off over the last couple of months, but the HGP-4 proposal was good motivation to put in some solid work and get it finished!

Newcomers to HB often enquire about a grid strategy in the Trader chat. The grid strategy is probably the most common way in which people are introduced to algorithmic trading. It is available free to use on exchanges like Binance and Kucoin, and also offered as a paid service on Bitsgap etc.

This medium article describes the algorithm for this strategy, how it is implemented on HB, and also shows some sample runs.

I have ideas for more advanced versions of this bot like weighted spread/amount grid bot, moving grid bot and so on. These need more research and I’ll aim to develop them in the future in a different proposal.

A fork of HB with this strategy included is at the link below:

I’m happy to work with the team to integrate the strategy, iron out any bugs, etc.

Please let me know your feedback!

Author: cgambit 0xdEa

There were many community members asking or intending to use Hummingbot as Grid Bot.

Finally, we will have useful Fixed Grid strategy! Thanks to your hard work.

We will definitely try this out, give feedback and questions.

Advanced versions you mentioned are even more interesting. Keep up the good work!

You will have my support & vote for approval of this strategy. Cheers!

Author: jamesPmagic 0x4eF

Thanks! I’ve updated the medium post with some results from a live run. I’ll add more results when I have them.

Author: Jelle {Cryptobot} 0xe8f

Awesome contribution, I will definitely test is out beginning next week !

Author: PHBR0 x58B

The first Dev Grant Proposal have been approved!

Follow these guidelines to request a participation on the Dev Grant: Hummingbot Governance Proposals (HGP) - Hummingbot Foundation

Author: pulkitnitj 0xe12

Why not just use PMM with custom api source sending fixed mid price. Creating a simple 4 line flask program can give you a custom source api based mid price. Set any levels you want along with floor and ceiling.

Why do we need a new strategy to already too bulky code?

Author: jamesPmagic 0x4eF

Reasons for a standalone strategy:

  • Easier to use for new users, since it has the same options/working as the fixed grid strategies on CEXs (Binance/kucoin)
  • Rebalancing of inventory is built into the strategy. The method described above would require manual rebalancing before starting the bot, and sometimes during bot operation (if a limit order at a certain level is not filled).
  • Using PMM with a large number of grid levels (say 15) will result in rate limits for the exchange being exceeded, since PMM deletes and replaces all orders on each fill (I discovered this issue during testing). In the fixed grid strategy, only the orders above/below the filled grid level are replaced.

Author: Alpha 0x56d

@jamesPmagic Thanks for this proposal and coding work you did. I am curious about rebalancing of inventory built into the strategy. I can understand at the beginning when we start bot this strategy rebalances base and quote currency automatically. e.g. if Base currency is not enough then it will buy appropriate amount of base currency using quote currency, assuming there is more than enough quote currency to take care both base and quote. However what about following scenario:

Scenario: When bot crosses ceiling(upper level) and now market is trending up. Will bot automatically reevaluate and rebalance so that bot is again within range. (If you are familiar with Bitsgap, it is often referred as trailing up feature wherein bot continuously trail up)