Flashbot is a Java and Scala framework for building, simulating, and running robust, low-latency Cryptocurrency trading strategies as a cluster of trading engines and market data servers.
Check out the following core files:
Interfaces
Core
- TradingEngine.scala
- DataSourceActor.scala
- BackfillService.scala
- TradingSessionActor.scala
- DataServer.scala
- Cross-platform. Windows, Linux, and Mac OS
- Pluggable strategies, exchanges, and data sources
- Market data server works for other financial markets too
- Backtests with simulated fees and latency
- Support for derivatives such as the XBTUSD futures contract
- Bots that run in live or paper mode
- Fault tolerance for strategies (bots are restored if they crash)
- Dashboards & alerting
- Configurable market data database via JDBC
- Delta compression for efficient streaming and storage of order books
- Automatic historical data collection and retention
- Tolerant to network and websocket failures (i.e. it manages the retries)
Check out the wiki for documentation.
Flashbot is published to Bintray, so you'll have to add our repository as a resolver in your build tool and then list Flashbot as a dependency.
Add the following line to your project settings in build.sbt:
resolvers += Resolver.bintrayRepo("infixtrading", "flashbot")
And then add the flashbot-client
and flashbot-server
dependencies as well:
libraryDependencies ++= Seq(
"com.infixtrading" %% "flashbot-client" % "0.0.1",
"com.infixtrading" %% "flashbot-server" % "0.0.1"
)
First add the repo to your gradle.build file:
repositories {
maven {
url "https://dl.bintray.com/infixtrading/flashbot"
}
}
Then add the dependencies to the file:
compile 'com.infixtrading:flashbot-client_2.12:0.0.1'
compile 'com.infixtrading:flashbot-server_2.12:0.0.1'
First add the repository to your pom.xml file:
...
<repositories>
...
<repository>
<id>bintray-<username>-maven</id>
<name>flashboot</name>
<url>https://dl.bintray.com/infixtrading/flashbot</url>
</repository>
...
</repositories>
...
Add the following dependencies to your pom.xml:
...
<dependencies>
...
<dependency>
<groupId>com.infixtrading</groupId>
<artifactId>flashbot-server_2.12</artifactId>
<version>0.0.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.infixtrading</groupId>
<artifactId>flashbot-client_2.12</artifactId>
<version>0.0.1</version>
<type>pom</type>
</dependency>
...
</dependencies>
...
The default configuration file contains a list of available options. You can override any of the settings in your own application.conf
file.
Akka is used for persistence, streaming, clustering, fault-tolerance, and concurrency control. Akka Cluster 2.5.x is a dependency, but running a cluster is not required. You may use Flashbot in standalone mode on a non-cluster actor system.
This project is alpha software. In it's current state it's a good tool for prototyping and simulating strategies however the unit tests are minimal and it hasn't been battle tested in production yet. Do not use it out of the box with real money yet! You have been warned.
Contributions are very welcome! This project is young, it's scope is large, and needs more manpower. Please propose issues through GitHub first before submitting a pull request.