Exchange configuration

For the moment, we only ran tests, so we never had to connect to the exchange we want to use. Now, let's suppose our strategy is ready to deal with real assets and that we want to use Kucoinopen in new window.

The first step is to add the right XChange library to your project. It's a bit like adding a JDBC driver. Go to the XChangeopen in new window website, find the corresponding directory. In our case, it's xchange-kucoin directoryopen in new window.

Inside this directory, you have to find the name of the class extending BaseExchange and implementing Exchange. In our case, it's org.knowm.xchange.kucoin.KucoinExchangeopen in new window . This name will be used in our file for the driver-class-name property.

Now, we can edit our application configuration located in src/main/resources/ to change the following properties with the parameters given by the exchange:

We also have to add the XChange library to our project pom.xml (the artifactId is Github directory name corresponding to the exchange you chose):


Last thing, as we are running in production, the two modes (dry & sandbox) must be set to false: