Cassandre trading bot (available as a Spring boot starter) allows you to create and execute your own trading strategy in seconds on most crypto exchanges.

Once the starter is added to your Spring boot project, it will search for a class having the @CassandreStrategy annotation and extending BasicCassandreStrategy or BasicTa4jCassandreStrategy.

For a BasicCassandreStrategy, you only have to implement the method getRequestedCurrencyPairs()to indicate the list of currency pairs tickers you want to receive.

Then, to be notified of updated data, you can override the following methods :

  • onAccountUpdate() to receive updates about your account.

  • onTickerUpdate()to receive new tickers.

  • onOrderUpdate()to receive updates about your orders.

  • onTradeUpdate() to receive updates about your trades.

  • onPositionUpdate() to receive updates about your positions.

Inside your strategy, you can create orders or positions with a call to getTradeService()or getPositionService().