- This project is fork of Blocknet's dxmakerbot market making/trading bot for Blocknet's decentralized exchange protocol, built with the XBridge API.
- Web Links
- Complete Setup with DEXSETUP
- Prerequisites
- Installation
- Creating Trading Strategy
- Running the Bot
- Maker Bot
- You can skip going over this readme/installation process and use DEXSETUP to setup complete DEXBOT and BlockDX even from scratch on Debian compatible operating systems
- Latest Blocknet wallet installed.
- The wallet of any assets you will be trading. See list of compatible assets.
- The Blocknet wallet and any other wallet you're trading out of must be fully synced and fully unlocked.
- The wallets used for trading must be configured. For simple setup, use Block DX's automated configuration setup wizard. Having Block DX installed and opened is also useful to visually monitor the market and your open orders.
- Make sure funds are split into multiple UTXOs. If you have an order for 1 LTC and you only have a single 10 LTC input, all 10 LTC will be locked in this order. Having multiple, preferably smaller, UTXOs will allow a better distribution of funds across orders.
- Make sure funds are in legacy addresses (Eg. LTC funds should be in a "L" address).
- Open the command line terminal to enter the following commands
- Install Python 3:
apt-get install python3
- Or upgrade Python 3:
apt-get upgrade python3
- Or upgrade Python 3:
- Install pip (Python's package manager):
apt-get install python3-pip
- Or upgrade pip:
apt-get upgrade python3-pip
- Or upgrade pip:
- Download DX Maker Bot
- Download via Git:
- Navigate to your project directory
- Example:
cd ~/Downloads/ccwallets/
- Download DX Maker Bot:
git clone https://github.com/nnmfnwl/dexbot
- Download DX Maker Bot:
- Download via Github:
- Navigate to https://github.com/nnmfnwl/dexbot
- Click the green Clone or download button and select Download ZIP from the dropdown
- Save the file and (if necessary) extract the contents to a folder
- Example:
- Navigate to your project directory
- Download via Git:
- Navigate into the dexbot folder
- Example:
cd ~/Downloads/ccwallets/dexbot
- Example:
- Install the required DX Maket Bot packages:
pip3 install -r requirements.txt
- If that command does not work:
pip install -r requirements.txt
- If that command does not work:
- Open Terminal to enter the following commands
- Install XCode:
xcode-select --install
- Install Homebrew (MacOS package manager):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Python 3:
brew install python3
- Upgrade pip (Python's package manager):
pip3 install -U pip
- Download DX Maker Bot
- Download via Git:
- Navigate to your project directory
- Example:
cd ~/Documents/ccwallets/
- Example:
- Download DX Maker Bot:
git clone https://github.com/nnmfnwl/dexbot
- Navigate to your project directory
- Download via Github:
- Navigate to https://github.com/nnmfnwl/dexbot
- Click the green Clone or download button and select Download ZIP from the dropdown
- Save the file and (if necessary) extract the contents to a folder
- Download via Git:
- Navigate into the dexbot folder
- Example:
cd ~/Documents/ccwallets/dexbot
- Example:
- Install the required DX Maket Bot packages:
pip3 install -r requirements.txt
- Install Python 3:
- Navigate to https://www.python.org/downloads/windows/ and select Download Python 3.7.x
- Run the installer
- Check off Add Python 3.7 to PATH
- Click Install Now
- Right-click the taskbar Start menu and select Command Prompt (Admin)
- Upgrade pip (Python's package manager):
py -m pip install --upgrade pip
- Download DX Maker Bot
- Download via Git:
- Navigate to your project directory
- Example:
C:\Users\%USERNAME%\Downloads\ccwallets/dexbot
- Example:
- Download DX Maker Bot:
git clone https://github.com/nnmfnwl/dexbot
- Navigate to your project directory
- Download via Github: 1. Navigate to https://github.com/nnmfnwl/dexbot 1. Click the green Clone or download button and select Download ZIP from the dropdown 1. Save the file and (if necessary) extract the contents to a folder
- Download via Git:
- Navigate into the dexbot folder
- Example:
cd C:\Users\%USERNAME%\Downloads\ccwallets/dexbot
- Example:
- Install the required DX Maket Bot packages:
pip3 install -r requirements.txt
- If that command does not work:
pip install -r requirements.txt
- If that command does not work:
- make copy of howto/examples/bot_v2_template.py strategy template into main dexbot directory and rename by strategy you wish to make
- open strategy template file by text editor and edit one by one
{}
items according inline documentation, like Edit RPC setings, edit the trading addresses to match the wallet addresses containing funds split into multiple UTXOs, - Make sure funds are in legacy addresses (Eg. LTC funds should be in a "L" address).
- Every strategy file represents just one way trading. So if you want provide liquidity for BLOC->LTC and also LTC->BLOCK, than you will need two strategy files.
- Save and close the file.
- Run the wallets of any assets being traded (fully synced, unlocked).
- Run the Blocknet wallet (fully synced, unlocked).
- Optional: Run Block DX for visual reference that the bot is working.
- At this stage it would be a good idea to test making/taking an order without using the bot to ensure everything is setup properly.
- Navigate to the dexbot directory in the terminal.
- To prevent multiple bot strategies pulling same data from external sources there is dexbot proxy process
- So at first there must be running bot pricing proxy instance:
python3 dxmakerbot_v2_proxy_run.py
- dexbot strategy config file represents one way market, for bidirectional trading there are always two strategies needed to run.
- For example to start specific previously created bidirectional dexbot strategy, where files are named strategy_BLOCK_LTC_liquidity.py and strategy_BLOCK_LTC_liquidity.py, need to run two commands in two terminal tabs:
python3 dxmakerbot_v2_run.py --config strategy_BLOCK_LTC_strategy1
- and
python3 dxmakerbot_v2_run.py --config strategy_LTC_BLOCK_strategy1
- To cancel all orders in market pair and address specified by --config file
python3 dxmakerbot_v2_run.py --config strategy_LTC_BLOCK_strategy1 --canceladdress
- To cancel all orders in market pair specified by --config file
python3 dxmakerbot_v2_run.py --config strategy_LTC_BLOCK_strategy1 --cancelmarket
- To cancel all orders
python3 dxmakerbot_v2_run.py --config strategy_LTC_BLOCK_strategy1 --cancelall
- For ability of this project to continue it needs your support:
- BTC LN: ****
- BTC: ****
- LTC: ****
- DOGE: ****
- XVG: ****
- PIVX: ****
- BLOCK: ****
- PKOIN: ****
- LBC: ****