forked from Ekliptor/WolfBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigLocal-sample.ts
121 lines (108 loc) · 4.12 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
// exported keys in here must be exactly the same as they are written on nconf object (except "root")
import {Currency} from "@ekliptor/bit-models";
const root = {
"apiKeys" : { // leeave empty to disable API keys (public access)
"JFSDFHl340udfnsf23SF234": true // set to false to disable a key
},
"updateUrl": "",
// put your MongoDB connection URL in here: mongodb://user:password@host:port/database
"mongoUrl": "",
"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")
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: "",
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
}],
BitMEX: [{
key: "",
secret: "",
marginNotification: 0.03,
testnet: false
}],
Deribit: [{
key: "",
secret: "",
marginNotification: 0.03,
testnet: false
}],
CoinbasePro: [{
key: "",
secret: "",
passphrase: "",
marginNotification: 0.5
}]
},
notify: {
Pushover: {
appToken: "",
receiver: ""
}
}
}
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
}
}
const serverConfig = new ServerConfig();
export {root, serverConfig}
export type MultipleCurrencyImportExchange = "Poloniex" | "Bitfinex";
export const currencyImportMap = new Map<MultipleCurrencyImportExchange, Currency.CurrencyPair[]>([
]);