-
-
Notifications
You must be signed in to change notification settings - Fork 46
Using Arbitrader
Arbitrader uses a configuration file called application.yaml. There is an example file in the project, but you will need to fill in which exchanges you want to use, and some other parameters. When you run Arbitrader, just make sure the configuration file is in the directory you run the bot from, and the program should read it in. If no configuration can be found, you'll get an error saying Spring couldn't start up.
The easiest way to run Arbitrader is through Docker. If you don't already have it, go ahead and install Docker on your machine. This project includes a Docker Compose file, so you can get up and running in just a few steps:
- Install Docker if necessary.
- Clone the project from GitHub.
- Create your
application.yamlbased onapplication.example.yaml. - Run
docker-compose upto start the bot.
If everything works properly you'll see Docker download the container and some log messages as it reads your configuration file and connects to the exchanges. Once you see the "Started Arbitrader..." message you may not see any further messages for awhile until it finds a trading opportunity.
In Windows docker-compose does not understand the ${PWD} environment variable and will not turn it into the current working directory automatically. A workaround is to create a file called .env (TIP: Name it .env. in the Save... dialog!) in the same directory as you are running Arbitrader in with one line of configuration that points to Arbitrader's directory:
PWD=C:\absolute\path\to\arbitrader\directory
Adding the aforementioned configuration will set the ${PWD} variable to the hard coded value that you picked.
When Arbitrader enters a trade it will write a JSON file in .arbitrader/arbitrader-state.json with the details of that trade. If you need to restart the bot for any reason, such as to update to a newer version, it will read that file on startup and remember the open trades.