Installation

Prerequisites

To get started make sure that you have the following:

Important: You must use node 18.0.0 You can use Node Version Manager (nvm) to manage your node version.

First clone the repo

git clone https://github.com/XPRNetwork/dex-bot.git

Navigate to the folder and in your terminal run

npm install

Edit your default.json using vscode or your code editor of choice.

If you want the bot to automatically cancel open orders on exit (when you command + c) for your convenience you can set this parameter to true

    "cancelOpenOrdersOnExit": true,

Choose the strategy, either gridBot or marketMaker

    "strategy": "gridBot",

Set your pairs and parameters (covered in next section)

    "gridBot": {
      "pairs": [
        {
          "symbol": "XPR_XMD",
          "upperLimit": 0.0009000,
          "lowerLimit": 0.0006000,
          "gridLevels": 14,
          "bidAmountPerLevel": 40000
        }             
      ]
    },

Enter environment variables in terminal. Depending on your operating system, enter the PROTON_USERNAME and PROTON_PRIVATE_KEY

Mac and Linux:
export PROTON_USERNAME=user1
export PROTON_PRIVATE_KEY=private_key

Windows using powershell:
$env:PROTON_USERNAME = 'user1'
$env:PROTON_PRIVATE_KEY = 'private_key'

Then you can run the bot

npm run bot

To stop the bot you can use Cmd+C (mac) or Ctrl+C (windows)

Important Notes

  • Minimum order is $1 or 1 XMD on Metal X

  • Bot will automatically add more orders once old ones are filled

  • If you have trouble using the trading interface make sure you have verified identity

  • Keep your private key protected

You can clear your private key from the screen in your terminal before you run the bot you can run the following command; Windows

cls

Mac / Linux

clear

Last updated