Skip to content
Alex Lopatin edited this page Jan 25, 2019 · 44 revisions

Welcome to the Flashbot documentation!

The best way to learn Flashbot right now is by following along to the getting started guide below. The source code for each section can be found at the Flashbot Java Examples and Flashbot Scala Examples repos for Java and Scala respectively.

Getting Started

Flashbot is not a pre-packaged program. Rather, it's a framework for building your own trading systems on the JVM. That said, you do not need to be an expert in Java systems programming to deploy a Flashbot project. In fact, one of the main goals of this project is to simplify real-world algorithmic trading (while making no compromises in power).

This page contains a series of tutorials that walkthrough a typical Flashbot project. We'll start with an empty Java/Scala project, and by the end of the series we will have built a fully deployed market-making strategy to an AWS cluster, complete with backtesting and monitoring through a real-time dashboard.

1. Project Setup

These tutorials show the basics of using Flashbot. They begin by creating a brand new Java/Scala project, and then show how to include Flashbot and do common things like ingesting data (trades, candles, and order books) and browsing that data with a Grafana dashboard.

2. Backtesting

Backtesting and optimizing strategies is the most common Flashbot use case. This tutorial explains the basics of how a backtest is run, either through the FlashbotClient or a dashboard. We'll demonstrate these concepts by using the dashboard to backtest the built-in DMAC crossover strategy.

Tutorial

3. Launching a bot

A "bot" is simply a strategy that is configured with some parameters and which is managed by the Flashbot framework so that it is constantly running. Bots can run in "paper" or "live" mode. Paper mode simulates orders locally, while live mode, predictably, submits real orders to exchanges. Any bot that exists in your Flashbot system has it's own live dashboard so that you have full visibility into what is happening.

Tutorial

4. Developing a custom strategy

The built-in MACD strategy is great, but if you're using Flashbot, you're probably looking to develop more advanced strategies. So, now that we're comfortable with the basics, let's start the real fun. In this tutorial we'll create a custom market-making strategy. Additionally, we'll backtest on historical order book data (which is automatically downloaded by Flashbot), simulate exchange fees and latency, write emit custom metrics/reports, and setup fail-safes that shut down the strategy when it detects anomalous market conditions or unreachable exchanges.

Tutorial

5. Cluster mode

Now that we have a powerful custom strategy working locally, we'll go through the process of deploying it on a cluster of AWS servers. We'll use just 2 nodes this time. One which is responsible for ingesting and serving market data, and another which manages and runs the live bot.

Tutorial

Clone this wiki locally