# Overview


If you are new to trading, you can read our tutorial "Trading basics".

# 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 starter (opens new window)) allows you to create and execute your trading strategy in seconds on most crypto exchanges. We also provide a dry mode and a spring boot starter to backtest your bot on historical and/or real-time data.

Once the starter is added to your Spring Boot project, it will search for a class having the @CassandreStrategy (opens new window) annotation and extending BasicCassandreStrategy (opens new window) or BasicTa4jCassandreStrategy (opens new window).

# BasicCassandreStrategy

For a BasicCassandreStrategy (opens new window), you have to implement :

# BasicTa4jCassandreStrategy

For a BasicTa4jCassandreStrategy (opens new window), you have to implement :

# Data updates

To be notified of new data, 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 a non-closed positions, you can get the:

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


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