Exchange configuration

Class managing the exchange configuration and connection.

Exchange auto configuration.

ExchangeAutoConfiguration class configures the exchange connexion with the parameters specified in application.properties :

#
# Exchange configuration.
cassandre.trading.bot.exchange.name=kucoin
cassandre.trading.bot.exchange.username=cassandre.crypto.bot@gmail.com
cassandre.trading.bot.exchange.passphrase=cassandre
cassandre.trading.bot.exchange.key=5df8eea30092f40009cb3c6a
cassandre.trading.bot.exchange.secret=5f6e91e0-796b-4947-b75e-eaa5c06b6bed
#
# Modes.
cassandre.trading.bot.exchange.modes.sandbox=true
cassandre.trading.bot.exchange.modes.dry=false
#
# Exchange API calls rates (ms or standard ISO 8601 duration like 'PT5S').
cassandre.trading.bot.exchange.rates.account=100
cassandre.trading.bot.exchange.rates.ticker=101
cassandre.trading.bot.exchange.rates.trade=102

This class does the following steps :

  • Validate parameters values.

  • Connect to the specified exchange.

  • Creates the services beans.

  • Creates the flux.

Those parameters are read and validated by ExchangeParameters.

Parameter

Description

cassandre.trading.bot.exchange.name

Name of the exchange you want to access. You can find a full list here.

cassandre.trading.bot.exchange.username

Exchange username.

cassandre.trading.bot.exchange.passphrase

Exchange passphrase.

cassandre.trading.bot.exchange.key

Exchange key.

cassandre.trading.bot.exchange.secret

Exchange secret.

cassandre.trading.bot.exchange.modes.sandbox

If set to true, Cassandre will use the exchange sandbox.

cassandre.trading.bot.exchange.modes.dry

If set to true, Cassandre will simulate orders and never send them to the exchange.

cassandre.trading.bot.exchange.rates.account

Maximum rates at which the exchange account service is called.

cassandre.trading.bot.exchange.rates.ticker

Maximum rates at which the exchange ticker service is called.

cassandre.trading.bot.exchange.rates.trade

Maximum rates at which the exchange trade service is called.