Overview

Introduction

A trading bot is a computer program that can automatically place orders to a market or exchange without the need for human intervention. They are working for you 24/7 and never lose their focus.

Cassandre trading bot (available as a Spring boot starteropen in new window) allows you to create and execute your trading strategy in seconds on several crypto exchanges.

Once the starter is added to your Spring Boot project, it will search for a class having the @CassandreStrategyopen in new window annotation and extending BasicCassandreStrategyopen in new window or BasicTa4jCassandreStrategyopen in new window.

We also provide a dry mode and a spring boot starter to simulate a virtual exchange so you can backtest your strategies on historical and/or real-time data.

BasicCassandreStrategy

For a BasicCassandreStrategyopen in new window, you have to implement :

BasicTa4jCassandreStrategy

For a BasicTa4jCassandreStrategyopen in new window, you have to implement :

Data updates

To receive data from the exchange, you can override the following methods :

Buying/selling

Inside your strategy, you can create market orders with the methods :

And limit orders with :

Positions

You can also create positions with :

On Positions, you can get the:

On a closed position, you can get the gain & fees with getGain()open in new window

TIP

If you don't know what a position is, read this position system explanation.