-
Notifications
You must be signed in to change notification settings - Fork 10
/
reference.conf
177 lines (148 loc) · 4.3 KB
/
reference.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
flashbot {
# The directory to store the state for all engines.
# It will be created if it doesn't exist yet.
engine-root = ${user.home}"/.flashbot/engines"
# Strategies available for backtests and bots.
# The ones listed below are the built-in strategies.
strategies {
scanner = "com.infixtrading.flashbot.strategies.ScannerStrategy"
time_series = "com.infixtrading.flashbot.strategies.TimeSeriesStrategy"
macd_crossover = "com.infixtrading.flashbot.strategies.MACDCrossover"
}
# The configured exchanges available for backtesting and bots.
# The following exchanges are the built-ins.
exchanges {
bitstamp {
class = "com.infixtrading.flashbot.exchanges.Bitstamp"
pairs = ["btc_usd", "eth_usd", "eth_btc", "ltc_usd", "ltc_btc"]
}
bitfinex {
class = "com.infixtrading.flashbot.exchanges.Bitfinex"
pairs = ["btc_usd", "eth_usd", "eth_btc", "ltc_usd", "ltc_btc"]
}
coinbase {
class = "com.infixtrading.flashbot.exchanges.Coinbase"
pairs = ["btc_usd", "eth_usd", "eth_btc", "ltc_usd", "ltc_btc"]
}
}
# DataSource classes available for data ingest and streaming data to strategies.
# The following data sources are the built-ins.
sources {
bitstamp {
class = "com.infixtrading.flashbot.sources.BitstampMarketDataSource"
}
bitfinex {
class = "com.infixtrading.flashbot.sources.BitfinexMarketDataSource"
}
coinbase {
class = "com.infixtrading.flashbot.sources.CoinbaseMarketDataSource"
}
}
ingest {
# Whitelist of data addresses to ingest.
#
# Examples:
# enabled = ["*/*/*"]
# enabled = ["bitmex/xbtusd/ladder", "binance/*/ladder"]
# enabled = ["*/*/candles"]
#
# Default:
# enabled = []
enabled = []
# Whitelist of data addresses to backfill. Same matching format as `enabled`.
backfill = []
# How long to keep data around for after it was ingested.
retention = [
["*/*/*", "90d"]
]
}
bots {
enabled = []
configs = {}
}
db = "h2"
grafana {
port = 3002
}
# The prototype for the Akka configuration. In order to supply these default settings to Akka,
# it is expected that the actor system will be started using the configuration from the
# FlashbotConfig like this:
#
# val conf = FlashbotConfig.load
# val system = ActorSystem("my-system", conf.akka)
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
loglevel = "DEBUG"
log-dead-letters-during-shutdown = off
actor {
allow-java-serialization = off
serializers {
kryo = "com.twitter.chill.akka.AkkaSerializer"
json = "com.infixtrading.flashbot.serializers.CirceAkkaSerializer"
}
serialization-bindings {
"io.circe.Json" = json
"com.infixtrading.flashbot.models.api.TradingEngineEvent" = kryo
"com.infixtrading.flashbot.models.api.DataServerMessage" = kryo
}
}
persistence {
journal {
plugin = "akka.persistence.journal.leveldb"
leveldb {
native = off
dir = ${flashbot.engine-root}"/journal"
compaction-intervals {
"*" = 10000
}
}
}
snapshot-store {
plugin = "akka.persistence.snapshot-store.local"
local.dir = ${flashbot.engine-root}"/snapshot-store"
}
}
}
}
engine-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
fixed-pool-size = 64
}
throughput = 1
}
# The default database configuration is an in-memory H2 database.
# It's useful for testing in standalone mode.
h2 {
profile = "slick.jdbc.H2Profile$"
db {
connectionPool = disabled
dataSourceClass = "slick.jdbc.DriverDataSource"
properties = {
driver = "org.h2.Driver"
url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"
}
}
}
dbHost = "localhost"
dbPort = "5432"
dbName = "flashbot"
dbUser = "flashbot"
dbPass = "flashbot"
# Use this in production
postgresdb = {
profile = "slick.jdbc.PostgresProfile$"
db {
dataSourceClass = "org.postgresql.ds.PGSimpleDataSource"
properties = {
databaseName = ${dbName}
serverName = ${dbHost}
portNumber = ${dbPort}
user = ${dbUser}
password = ${dbPass}
}
numThreads = 8
}
}