Trading-bot is a project built in scala, which is responsible for generating and placing orders to the orderbook, to make this, the bot has to connect with the lssd grpc app.
Firstly it registers the currencies with which it will be working, after that it creates the trading_pair, then creates orders randomly, to both sides, Sell and Buy and send them to the lssd.
- Trading bot defines where to find the lnd nodes.
- Create the currencies
- Define the trading pair
- Create the order
- Place the order
- Wait until order gets matched
- Wait until swap is completed
- Place a new order when swap is completed
To run this project you have to install the next components:
-
Java 8 Oracle:
- Ubuntu 18.04:
sudo apt install openjdk-8-jdk - Ubuntu 16.04: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
- Ubuntu 18.04:
-
Download and Install sbt: https://www.scala-sbt.org/
Before running the bot we must configure the lnd in the next ports without macaroons:
- LTC: localhost:10001
- BTC: localhost:10002
- XSN: localhost:10003
Clone the repository with
`git clone https://github.com/X9Developers/DexAPI`
Open the project and you must add the cert file into
trading-bot/src/main/resources
Then you must open a terminal in project root and run sbt run