Beaxy Accelerates Automated Trading Through Hummingbot Partnership

March 17, 2021 | 

Hummingbot

Beaxy Exchange is officially integrated with Hummingbot, an open-source platform for automated trading.

Hummingbot is free to download and gives you access to customizable algorithmic trading bots that specialize in market-making.

Deploy Hummingbot across dozens of trading pairs on Beaxy or configure a cross-exchange strategy to perform high-frequency trading between Beaxy and other exchanges. In this article, we will explain how to get your bot up and running in minutes, the applicable strategies that you can use, and what you need to consider when configuring your trading bot.

Getting Started with Hummingbot

To get started, log into your Beaxy account and download Hummingbot.

Once Hummingbot opens in your computer’s terminal, you will be prompted to create the password that you will use to access the bot.

Inside the terminal, type ‘connect beaxy’ to establish a connection to your Beaxy Exchange account. In your Beaxy account, create a new set of API Keys. These will act as a username and password that Hummingbot uses to manage your Beaxy account on your behalf.

Hummingbot

Now that you’ve specified that you want the bot to connect to your Beaxy account, it will prompt you to enter the API keys that you just generated in your Beaxy Account.

Hummingbot

Hummingbot is now connected to your Beaxy Exchange account. It’s time to pick a market-making strategy and tell the bot how you want it to behave.

To do this, type ‘create’ in the command line and hit enter.

Next, Hummingbot will ask you to pick between pure market-making and cross-exchange market-making.

Pure Market Making

The pure market making strategy automatically creates bid and ask orders to buy and sell a specific asset within a single exchange. Define this as your strategy by typing ‘pure_market_making’ into the command line and hit enter.

Hummingbot

After choosing your market-making strategy, enter ‘beaxy’ into the command line so that the bot knows which exchange you want to make a market on.

Hummingbot

Once you’ve set the exchange that your orders will be sent to, type in the trading pair that you want the bot to run on (separated by a hyphen) and hit enter.

Hummingbot

Now you can begin to define how your bot will behave. First, enter the distance, as a percentage, from the mid-price for your bid orders. In the example below, we choose 0.03%. For an asset with a mid-price of $100.00, our bid order will be placed to buy at $99.97.

Hummingbot

Enter the distance for your ask orders. We choose 0.03% for this example as well. In this case, the ask order will be placed to sell at $100.03.

Hummingbot

Determine how often you want your bot to cancel and replace orders. Enter the amount in seconds and hit enter. In the example below, we told the bot to cancel and replace orders every 15 seconds if they are not filled.

Hummingbot

Next, determine the amount of value contained in each order. In the example below, we chose 0.25 BTC. A bid order will be placed to buy 0.25 BTC with the equivalent USDC value and an ask order will be placed to sell 0.25 BTC.

Hummingbot

Before starting your bot, you will be asked if you want to enable the ping pong feature. When ping pong is turned off, your bot will continue placing bid and ask orders until they are filled based on the amount you entered earlier. When ping pong is turned on, the bot will ensure a balanced amount of bid and ask orders are entered at all times.

Hummingbot

Hummingbot will generate a file name for your trading bot. Hit enter to continue.

Hummingbot

At this stage, your bot has all of the information it needs to begin making a market for you. Type ‘start’ into the command line and hit enter. Your bid and ask orders will automatically begin to open on Beaxy Exchange.

Hummingbot

Cross Exchange Market Making

The cross exchange market-making strategy works similarly to the pure market-making strategy with the primary difference being that the cross-exchange bot places a maker order on one exchange and a taker on another.

By adding in a maker order on one side, you can define a minimum level of profit that a trade needs in order for the bot to execute. If you set this parameter at 1%, the bot will ignore any opportunity that will generate less than 1% of the profit. When configuring this strategy, you will need to ensure that you have entered the APIs keys for your second exchange in order to connect to it in addition to Beaxy Exchange.

Configure Your Trading Bot

As we’ve seen in the example configurations above, the decision points that will determine how your bot behaves include:

  • Distance from mid-point price: Bid and Ask
  • Time Between Order Cancellation and Replacement

Distance from the mid-point price defines, in terms of percentages, where the bid and ask orders that your bot opens will be relative to the mid-point price. For example, if the mid-point price of BTC-USDC is $50,000 and you set your orders 1% away from that price, your bot will enter a bid order to buy at $49,500 and an ask order to sell at $50,500.

The trade-off with distance is the probability that your orders will be filled. Using a smaller distance will result in more orders being executed. As you move away from the mid-price, you can expect orders to take increasingly more time to execute.

The time between order cancellation and replacement specifies how long your bot should wait before canceling and updating your orders. From the previous example, we told the bot to open orders 1% away from the mid-price with the bid and ask orders entered at $49,500 and $50,000.

If you set the cancel and replace at 30 seconds, the bot will leave the orders open for 30 seconds. If the orders are not filled, they will be canceled and the bot will submit new orders that are 1% away from the mid-point. Let’s say that after we entered our original order, the BTC-USDC price moved to $50,200. This move wasn’t far enough to hit any of the open orders within 30 seconds. The bot will cancel the original orders and submit new ones based on the updated mid-point price of $50,200 (Bid: $49,698 / Ask: $50,702).

You’re now ready to get started with Hummingbot on Beaxy!

While you were away, new posts appeared on our blog.