-
Notifications
You must be signed in to change notification settings - Fork 213
/
configLocal-sample.ts
266 lines (251 loc) · 8.01 KB
/
configLocal-sample.ts
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
// exported keys in here must be exactly the same as they are written on nconf object (except "root")
import {Currency} from "@ekliptor/bit-models";
import {nconf} from "@ekliptor/apputils";
const root = {
"apiKeys" : { // leeave empty to disable API keys (public access)
"JFSDFHl340udfnsf23SF234": true // set to false to disable a key
},
"updateUrl": "",
"mongoUrl": process.env.WOLF_CONTAINER === "docker" ? "mongodb://mongodb:27017/wolfbot" :
// put your MongoDB connection URL in here: mongodb://user:password@host:port/database
process.env.WOLF_MONGO,
"searchHosts": [], // elasticsearch host:port - currently not used
// proxy config. only needed if the exchange you want to trade on isn't accessible from your IP
"proxy": "", // http://user:password@host:port
"proxyAuth" : "", // http://user:password@DOMAIN:port <- domain is a constant replaced by the app
"ipCheckUrl" : "" // a URL returning JSON: {ip: "my.ip"}
}
const DEFAULT_MARGIN_NOTIFICATION = 0.26
const DEFAULT_EXCHANGE_PROXY = [] // an array of proxy strings. chosen randomly
class ServerConfig {
// place any config from bit-models/serverConfig.ts in here to overwrite it with app-specific values
//public notificationMethod = "NoNotificationService" // name of the notification class ("Pushover") // use value from config.json
public adminNotificationMethod = "NoNotificationService"
// place all keys here. we don't run user specific configurations to keep the design simpler. each user has his own bot instance
public apiKey = {
// a class with the exact same name has to exist under /Exchanges/ resp /Notifications/
exchange: {
// remove an exchange here to disable trading on it
// marginNotification,proxy are optional. leave empty to disable it
Poloniex: [{
key: "",
secret: "",
marginNotification: DEFAULT_MARGIN_NOTIFICATION
}],
OKEX: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.03,
proxy: DEFAULT_EXCHANGE_PROXY
}],
Kraken: [{
key: "",
secret: "",
marginNotification: 0.75
}],
// we need to 2 keys per array entry on bitfinex because we use API v2 and v1 currently
Bitfinex: [{
key: "",
secret: "",
key2: "",
secret2: "",
marginNotification: 0.22 // min margin 0.13
}],
Bittrex: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Binance: [{
key: "",
secret: "",
marginNotification: 0.5
}],
BinanceUS: [{
key: "",
secret: "",
marginNotification: 0.5
}],
BitMEX: [{
key: "",
secret: "",
marginNotification: 0.03,
testnet: false
}],
Deribit: [{
key: "",
secret: "",
marginNotification: 0.03,
testnet: false
}],
CoinbasePro: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.5
}],
Bitstamp: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.5
}],
CexIo: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.5
}],
Cobinhood: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Gemini: [{
key: "",
secret: "",
marginNotification: 0.5
}],
HitBTC: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Huobi: [{
key: "",
secret: "",
marginNotification: 0.5
}],
KuCoin: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.5
}],
Nova: [{
key: "",
secret: "",
marginNotification: 0.5
}],
BitForex: [{
key: "",
secret: "",
marginNotification: 0.5
}],
FCoin: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Bibox: [{
key: "",
secret: "",
marginNotification: 0.5
}],
BinanceFutures: [{
key: "",
secret: "",
marginNotification: 0.5
}],
KrakenFutures: [{
key: "",
secret: "",
marginNotification: 0.5
}],
BxCo: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Liquid: [{
key: "",
secret: "",
marginNotification: 0.5
}],
YoBit: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Coss: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Bybit: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Bitkub: [{
key: "",
secret: "",
marginNotification: 0.5
}],
TheRockTrading: [{
key: "",
secret: "",
marginNotification: 0.5
}],
FTX: [{
key: "",
secret: "",
marginNotification: 0.5
}],
Peatio: [{
key: "",
secret: "",
domain: "",
marginNotification: 0.5
}],
LoggerEx: [{
key: "",
secret: "",
marginNotification: 0.5
}],
},
notify: {
Pushover: {
appToken: "",
receiver: ""
},
Telegram: {
receiver: "",
channel: "",
serverPort: 5142
}
}
}
public twitterApi = {
consumerKey: '',
consumerSecret: '',
// we can get additional queries by removing this (limit per app instead of per user)
accessTokenKey: '',
accessTokenSecret: ''
}
public backtest = {
from: "2017-08-01 00:00:00",
to: "2017-09-04 00:00:00",
startBalance: 1.0, // for every coin (leveraged *2.5 when margin trading)
slippage: 0.0, // in %, for example 0.05%
cacheCandles: false,
walk: true, // Walk Forward Analysis: load previously optimized parameters and continue optimizing on them
resetWarmupBacktestErrorSec: 30,
timeOffsetMin: 0
}
}
// premium config
let orverrides = () => {
}
const serverConfig = new ServerConfig();
let tradingViewAccount = {
email: "",
password: ""
}
export {root, serverConfig, orverrides, tradingViewAccount}
export type MultipleCurrencyImportExchange = "Poloniex" | "Bitfinex" | "BitMEX";
export const currencyImportMap = new Map<MultipleCurrencyImportExchange, Currency.CurrencyPair[]>([
]);
export const liveTradeImportMap = new Map<MultipleCurrencyImportExchange, Currency.CurrencyPair[]>([
]);