Skip to content
Alex Lopatin edited this page Jan 27, 2020 · 44 revisions

Welcome to the Flashbot documentation!

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

Documentation Contents


Getting Started Tutorials

Flashbot is not a pre-packaged program. Rather, it's a framework for building your own trading systems on the JVM. Don't worry if you're not an expert in Java though, one of the main goals of this project is to simplify real-world algorithmic trading (while making no compromises in power).

This section contains a series of tutorials that walkthrough a typical Flashbot project. We'll start with an empty Java/Scala project, then collect some historical & live market data feeds, 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

This tutorial shows how to start a new Flashbot project and how to interact with it using the FlashbotClient.

2. Market Data Dashboard

This tutorial will show the basics of ingesting data (trades, candles, and order books). We'll also setup a SQL database for market data persistence and a Grafana dashboard for browsing that data.

3. Backtesting

Backtesting and optimizing strategies is a core use case of Flashbot. This tutorial explains the basics of how a backtest is run, either programmatically using the FlashbotClient class or interactively through the dashboard. We'll demonstrate by collecting Coinbase data and running backtests on the built-in DMAC crossover strategy.

4. Launching a Bot

So far we've seen how to backtest strategies on historical data. Now that we have selected a strategy and found optimal parameters, it's time to launch the strategy on live data by creating a bot.

5. Custom Market Making Strategy

The built-in DMAC 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 and run it on live order book data. Additionally, we'll backtest on historical candle data, 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.

6. Deploying to AWS

Now that we have a custom market making 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.