Dexalot Hummingbot Stepping Stones Part III

Published by AVAX on

Making the Dexalot-Gateway Connection and Setting up a Bot

Are you interested in running a bot on Dexalot? If you have entered the dMiner program, used Docker Compose to install Hummingbot and Gateway you can next connect Hummingbot to Dexalot via Gateway and set up your first bot. We will be using about 2 $AVAX to do so. You may stop the bot at any time. Use only at your own risk. Let’s get stepping.

Preparing your Wallet

To get set up, go to Dexalot, connect a wallet and deposit any amount of $AVAX you feel comfortable using. 2 $AVAX is about the smallest amount you can use. Deposit it into your Dexalot portfolio. You can follow this video or check out the Subnet Guide for more details.

Connecting to Dexalot

cd into the root of your copy of…/deploy-examples/hummingbot_gateway_compose and enter:

  • docker compose up -d
  • docker attach hummingbot and add your password

In another terminal cd into the root of your copy of…/deploy-examples/hummingbot_gateway_compose and enter:

  • docker attach gateway

This will allow you to see what is happening on your instance of Gateway.

Now you are ready to use Gateway to connect to Dexalot. To help ensure that you make the correct entries, select the option you want from the drop-down menu.

  • gateway connect dexalot

Now answer the following questions including supplying your wallet’s private key to that wallet where you have added the 2 $AVAX.

  • Which chain do you want dexalot to connect to? (avalanche) >>> avalanche
  • Which network do you want dexalot to connect to? (dexalot) >>> dexalot
  • Do you want to continue to use node URL ‘https://subnets.avax.network/dexalot/mainnet/rpc' for avalanche=dexalot (Yes/No) Yes
  • Enter your avalanche-dexalot wallet private key >>>]walletprivate key[
  • Enter your Dexalot API key (you can request one from the Dexalot team) >>>

When asked for an API key, just hit enter. You do not need to enter an API key here. If you have one, you may enter it.

Please note:

Your private key is encrypted and can not be unencrypted. You may want to make sure that you have the wallet you are using here set as a dMiner trading wallet. Your bot will be able to take advantage of both dMiner and DIP rewards. You may set up multiple dMiner trading wallets so you can create one just for your bot wallet if you prefer.

If everything works, you will see a final line saying that the “dexalot connecter now uses…”

That’s it you are now connected to Dexalot!

Setting up a Bot

The rest of this tutorial will require you to use the 2 $AVAX you have deposited in your Dexalot portfolio. You may lose some or all of these assets so only start the bot if you are able to risk this amount. You can check an estimated percentage return change in your balances at any time by viewing the number in the lower left corner of your Humminbot dashboard. You can stop the bot and exit Hummingbot immediately at any time (type- stop and then exit or just exit).

We are going to create a bot with simple parameters.

Type

  • create and then enter and then add the following answers to the questions below. ( We will discuss using other parameters, including different trade pairs, distance from midprice, etc. in another article.)

You can use this file name or rename it with something informative for you. This will contain your bot’s parameters and can be imported at a later time if you want to run this same bot again without needing to resupply answers to the listed questions again.

Once you enter this file-name you are ready to start your bot.

Enter

  • start and you will see your wallet’s balance displayed.

If you wish to continue with running the bot and allowing your bot to access these balances enter Yes, otherwise, enter No.

Once you enter yes — your bot will start up and you will start to see you can check on both the activity in your gateway terminal you attached earlier as well as in the Hummingbot terminal. You may also notice errors Hummingbot may generate as it makes calls to Dexalot and other resources in the pane on the right (as shown below).

You can type status to see if your bot has placed an order yet. You will see these listed under “Orders” if they have been placed.

Now if you see ‘Orders:’ go to Dexalot and verify that your bot has placed an order in the Dexalot Orders tab.

The parameters you set for your bot will result in your bot placing an order randomly at 0.3 percent of a basis point from the mid-price every 7 minutes or so. The bot will alternate its orders between buys and sells after one is filled, otherwise after about 7 minutes it will cancel and repost another order in place of the one it placed prior.

Enter

  • history to see how your bot has done and enter
  • stop and exit if you would like it to stop and exit.

Otherwise, you can let your bot run overnight and read the next article in this series. This next article will show you how to adjust the parameters so as to help you optimize the activity of your bot.

Author: Brad McFall

Editor: Dan Marcoulis

Graphics: Can Toygar

About Dexalot:

Dexalot is a revolutionary decentralized exchange bringing the traditional centralized exchange look and feel to a decentralized on-chain application. Its mission is to bring a truly inclusive and transparent environment where Dexalot users can trade crypto securely and efficiently, with no slippage or custody risk. It is built on Avalanche, the fastest smart contracts platform in the blockchain industry.

Website | Twitter | Telegram | Medium |Discord


Dexalot Hummingbot Stepping Stones Part III was originally published in Dexalot on Medium, where people are continuing the conversation by highlighting and responding to this story.

Source

Categories: DEFI_NEWS