@icgio/clients-config 1.0.149 → 1.0.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config-archive.json +188 -678
- package/config-benchmarks.js +61 -0
- package/config.js +2 -2
- package/config.json +16 -16
- package/package.json +27 -27
- package/update-config-json.js +34 -34
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const benchmarks = {
|
|
2
|
+
min_balance: {
|
|
3
|
+
ULTI: {
|
|
4
|
+
bybitv5_1: {
|
|
5
|
+
USDT: 7000,
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
orderbook_depth_in_quote_cur: {
|
|
10
|
+
AVALOX: {
|
|
11
|
+
gatev4: {
|
|
12
|
+
AVALOXUSDT: [[0.01, 1000]],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
LUCIC: {
|
|
16
|
+
xt: {
|
|
17
|
+
LUCICUSDT: [[0.01, 1000]],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
MAK: {
|
|
21
|
+
bitget: {
|
|
22
|
+
MAKUSDT: [[0.01, 500]],
|
|
23
|
+
},
|
|
24
|
+
bybitv5: {
|
|
25
|
+
MAKUSDT: [[0.01, 500]],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
ask_bid_spread: {
|
|
30
|
+
AVALOX: {
|
|
31
|
+
gatev4: {
|
|
32
|
+
AVALOXUSDT: 0.01,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
MAK: {
|
|
36
|
+
bitget: {
|
|
37
|
+
MAKUSDT: 0.01,
|
|
38
|
+
},
|
|
39
|
+
bybitv5: {
|
|
40
|
+
MAKUSDT: 0.01,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
volume_24h_in_quote_cur: {
|
|
45
|
+
ETHF: {
|
|
46
|
+
mexc: {
|
|
47
|
+
ETHFUSDT: 50000,
|
|
48
|
+
},
|
|
49
|
+
htx: {
|
|
50
|
+
ETHFUSDT: 50000,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
MAK: {
|
|
54
|
+
bitget: {
|
|
55
|
+
MAKUSDT: 300000,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = benchmarks
|
package/config.js
CHANGED
|
@@ -90,8 +90,8 @@ module.exports.client_enabled = client_enabled
|
|
|
90
90
|
const client_levels = config_data.client_levels
|
|
91
91
|
module.exports.client_levels = client_levels
|
|
92
92
|
|
|
93
|
-
const
|
|
94
|
-
module.exports.
|
|
93
|
+
const client_price_index_curs = config_data.client_price_index_curs
|
|
94
|
+
module.exports.client_price_index_curs = client_price_index_curs
|
|
95
95
|
|
|
96
96
|
const client_telegram_ids = config_data.client_telegram_ids
|
|
97
97
|
module.exports.client_telegram_ids = client_telegram_ids
|
package/config.json
CHANGED
|
@@ -250,23 +250,23 @@
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"client_levels": {
|
|
253
|
-
"ARMY": [10, 50, 100],
|
|
254
|
-
"AVALOX": [10, 50, 100],
|
|
255
|
-
"CP": [10, 50, 100],
|
|
256
|
-
"ETHF": [10, 50, 100],
|
|
257
|
-
"IONX": [10, 50, 100],
|
|
258
|
-
"JYAI": [10, 50, 100],
|
|
259
|
-
"LANLAN": [10, 50, 100],
|
|
260
|
-
"LUCIC": [10, 50, 100],
|
|
261
|
-
"MAK": [10, 50, 100],
|
|
262
|
-
"OPUL": [10, 50, 100],
|
|
263
|
-
"SARA": [10, 50, 100],
|
|
264
|
-
"SHRAP": [10, 50, 100],
|
|
265
|
-
"SWFTC": [10, 50, 100],
|
|
266
|
-
"TITAN": [10, 50, 100],
|
|
267
|
-
"ULTI": [10, 50, 100]
|
|
253
|
+
"ARMY": [1, 2, 5, 10, 20, 50, 100],
|
|
254
|
+
"AVALOX": [1, 2, 5, 10, 20, 50, 100],
|
|
255
|
+
"CP": [1, 2, 5, 10, 20, 50, 100],
|
|
256
|
+
"ETHF": [1, 2, 5, 10, 20, 50, 100],
|
|
257
|
+
"IONX": [1, 2, 5, 10, 20, 50, 100],
|
|
258
|
+
"JYAI": [1, 2, 5, 10, 20, 50, 100],
|
|
259
|
+
"LANLAN": [1, 2, 5, 10, 20, 50, 100],
|
|
260
|
+
"LUCIC": [1, 2, 5, 10, 20, 50, 100],
|
|
261
|
+
"MAK": [1, 2, 5, 10, 20, 50, 100],
|
|
262
|
+
"OPUL": [1, 2, 5, 10, 20, 50, 100],
|
|
263
|
+
"SARA": [1, 2, 5, 10, 20, 50, 100],
|
|
264
|
+
"SHRAP": [1, 2, 5, 10, 20, 50, 100],
|
|
265
|
+
"SWFTC": [1, 2, 5, 10, 20, 50, 100],
|
|
266
|
+
"TITAN": [1, 2, 5, 10, 20, 50, 100],
|
|
267
|
+
"ULTI": [1, 2, 5, 10, 20, 50, 100]
|
|
268
268
|
},
|
|
269
|
-
"
|
|
269
|
+
"client_price_index_curs": {
|
|
270
270
|
"ARMY": ["BTC", "ETH"],
|
|
271
271
|
"AVALOX": ["BTC", "ETH"],
|
|
272
272
|
"CP": ["BTC", "ETH"],
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@icgio/clients-config",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/icgio/clients-config.git"
|
|
12
|
-
},
|
|
13
|
-
"author": "",
|
|
14
|
-
"license": "ISC",
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/icgio/clients-config/issues"
|
|
17
|
-
},
|
|
18
|
-
"homepage": "https://github.com/icgio/clients-config#readme",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"lodash": "^4.17.20"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"fs-extra": "^11.2.0",
|
|
24
|
-
"node-cmd": "^5.0.0",
|
|
25
|
-
"prompt": "^1.3.0"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@icgio/clients-config",
|
|
3
|
+
"version": "1.0.151",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/icgio/clients-config.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/icgio/clients-config/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/icgio/clients-config#readme",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"lodash": "^4.17.20"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"fs-extra": "^11.2.0",
|
|
24
|
+
"node-cmd": "^5.0.0",
|
|
25
|
+
"prompt": "^1.3.0"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/update-config-json.js
CHANGED
|
@@ -75,13 +75,13 @@ function delete_client(client_name) {
|
|
|
75
75
|
delete config_file_data.client_pair_main_exchanges[client_name]
|
|
76
76
|
delete config_file_data.client_not_include_exchanges[client_name]
|
|
77
77
|
delete config_file_data.client_levels[client_name]
|
|
78
|
-
delete config_file_data.
|
|
78
|
+
delete config_file_data.client_price_index_curs[client_name]
|
|
79
79
|
delete config_file_data.client_telegram_ids[client_name]
|
|
80
80
|
delete config_file_data.clients_reporter_interval[client_name]
|
|
81
81
|
|
|
82
82
|
for (let key in config_file_data.client_enabled) {
|
|
83
83
|
if (config_file_data.client_enabled.hasOwnProperty(key)) {
|
|
84
|
-
delete config_file_data.client_enabled[key][client_name]
|
|
84
|
+
delete config_file_data.client_enabled[key][client_name]
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -131,7 +131,7 @@ function add_client(client_name) {
|
|
|
131
131
|
description: 'Enter client levels (Comma-separated values, e.g. 2, 5, 10 ) ',
|
|
132
132
|
required: true,
|
|
133
133
|
},
|
|
134
|
-
|
|
134
|
+
client_price_index_curs: {
|
|
135
135
|
description: 'Enter client benchmarks (Comma-separated values, e.g., BTC,ETH)',
|
|
136
136
|
required: false,
|
|
137
137
|
},
|
|
@@ -159,15 +159,15 @@ function add_client(client_name) {
|
|
|
159
159
|
let reporter_interval = result.clients_reporter_interval.trim()
|
|
160
160
|
reporter_interval = JSON.parse(reporter_interval)
|
|
161
161
|
|
|
162
|
-
let not_include_exchanges = []
|
|
162
|
+
let not_include_exchanges = []
|
|
163
163
|
if (result.client_not_include_exchanges) {
|
|
164
|
-
not_include_exchanges = result.client_not_include_exchanges.split(',').map((value) => value.trim())
|
|
165
|
-
not_include_exchanges.sort()
|
|
164
|
+
not_include_exchanges = result.client_not_include_exchanges.split(',').map((value) => value.trim())
|
|
165
|
+
not_include_exchanges.sort()
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
let benchmarks = []
|
|
169
|
-
if (result.
|
|
170
|
-
benchmarks = result.
|
|
169
|
+
if (result.client_price_index_curs) {
|
|
170
|
+
benchmarks = result.client_price_index_curs.split(',').map((value) => value.trim())
|
|
171
171
|
benchmarks.sort()
|
|
172
172
|
}
|
|
173
173
|
let levels = result.client_levels.split(',').map((value) => Number(value.trim()))
|
|
@@ -179,18 +179,17 @@ function add_client(client_name) {
|
|
|
179
179
|
|
|
180
180
|
config_file_data.client_not_include_exchanges[client_name] = not_include_exchanges
|
|
181
181
|
config_file_data.client_levels[client_name] = levels
|
|
182
|
-
config_file_data.
|
|
182
|
+
config_file_data.client_price_index_curs[client_name] = benchmarks
|
|
183
183
|
|
|
184
184
|
config_file_data.client_telegram_ids[client_name] = result.client_telegram_ids
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
config_file_data.
|
|
188
|
-
config_file_data.
|
|
189
|
-
config_file_data.
|
|
190
|
-
config_file_data.
|
|
191
|
-
config_file_data.
|
|
192
|
-
config_file_data.
|
|
193
|
-
config_file_data.client_telegram_ids = sort(config_file_data.client_telegram_ids);
|
|
186
|
+
config_file_data.client_exchange_pairs = sort(config_file_data.client_exchange_pairs)
|
|
187
|
+
config_file_data.client_pair_main_exchanges = sort(config_file_data.client_pair_main_exchanges)
|
|
188
|
+
config_file_data.clients_reporter_interval = sort(config_file_data.clients_reporter_interval)
|
|
189
|
+
config_file_data.client_not_include_exchanges = sort(config_file_data.client_not_include_exchanges)
|
|
190
|
+
config_file_data.client_levels = sort(config_file_data.client_levels)
|
|
191
|
+
config_file_data.client_price_index_curs = sort(config_file_data.client_price_index_curs)
|
|
192
|
+
config_file_data.client_telegram_ids = sort(config_file_data.client_telegram_ids)
|
|
194
193
|
|
|
195
194
|
write_config_file(config_file_data, config_file_path)
|
|
196
195
|
.then(() => {
|
|
@@ -222,33 +221,32 @@ function update_config_archive(config_file_data, client_name) {
|
|
|
222
221
|
config_archive_data.clients_reporter_interval[client_name] = config_file_data.clients_reporter_interval[client_name]
|
|
223
222
|
config_archive_data.client_not_include_exchanges[client_name] = config_file_data.client_not_include_exchanges[client_name]
|
|
224
223
|
config_archive_data.client_levels[client_name] = config_file_data.client_levels[client_name]
|
|
225
|
-
config_archive_data.
|
|
224
|
+
config_archive_data.client_price_index_curs[client_name] = config_file_data.client_price_index_curs[client_name]
|
|
226
225
|
config_archive_data.client_telegram_ids[client_name] = config_file_data.client_telegram_ids[client_name]
|
|
227
226
|
|
|
228
227
|
if (!config_archive_data.client_enabled) {
|
|
229
|
-
config_archive_data.client_enabled = {}
|
|
228
|
+
config_archive_data.client_enabled = {}
|
|
230
229
|
}
|
|
231
230
|
for (let key in config_file_data.client_enabled) {
|
|
232
231
|
if (config_file_data.client_enabled.hasOwnProperty(key)) {
|
|
233
232
|
if (!config_archive_data.client_enabled[key]) {
|
|
234
|
-
config_archive_data.client_enabled[key] = {}
|
|
233
|
+
config_archive_data.client_enabled[key] = {}
|
|
235
234
|
}
|
|
236
|
-
config_archive_data.client_enabled[key][client_name] = config_file_data.client_enabled[key][client_name]
|
|
235
|
+
config_archive_data.client_enabled[key][client_name] = config_file_data.client_enabled[key][client_name]
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
238
|
|
|
240
|
-
|
|
241
|
-
config_archive_data.
|
|
242
|
-
config_archive_data.client_pair_main_exchanges = sort(config_archive_data.client_pair_main_exchanges);
|
|
239
|
+
config_archive_data.client_exchange_pairs = sort(config_archive_data.client_exchange_pairs)
|
|
240
|
+
config_archive_data.client_pair_main_exchanges = sort(config_archive_data.client_pair_main_exchanges)
|
|
243
241
|
config_archive_data.clients_reporter_interval = sort(config_archive_data.clients_reporter_interval)
|
|
244
|
-
config_archive_data.client_not_include_exchanges = sort(config_archive_data.client_not_include_exchanges)
|
|
245
|
-
config_archive_data.client_levels = sort(config_archive_data.client_levels)
|
|
246
|
-
config_archive_data.
|
|
247
|
-
config_archive_data.client_telegram_ids = sort(config_archive_data.client_telegram_ids)
|
|
248
|
-
|
|
242
|
+
config_archive_data.client_not_include_exchanges = sort(config_archive_data.client_not_include_exchanges)
|
|
243
|
+
config_archive_data.client_levels = sort(config_archive_data.client_levels)
|
|
244
|
+
config_archive_data.client_price_index_curs = sort(config_archive_data.client_price_index_curs)
|
|
245
|
+
config_archive_data.client_telegram_ids = sort(config_archive_data.client_telegram_ids)
|
|
246
|
+
|
|
249
247
|
for (let key in config_archive_data.client_enabled) {
|
|
250
248
|
if (config_archive_data.client_enabled.hasOwnProperty(key)) {
|
|
251
|
-
config_archive_data.client_enabled[key] = sort(config_archive_data.client_enabled[key])
|
|
249
|
+
config_archive_data.client_enabled[key] = sort(config_archive_data.client_enabled[key])
|
|
252
250
|
}
|
|
253
251
|
}
|
|
254
252
|
|
|
@@ -269,10 +267,12 @@ function update_config_archive(config_file_data, client_name) {
|
|
|
269
267
|
}
|
|
270
268
|
|
|
271
269
|
function sort(obj) {
|
|
272
|
-
return Object.keys(obj)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
return Object.keys(obj)
|
|
271
|
+
.sort()
|
|
272
|
+
.reduce((result, key) => {
|
|
273
|
+
result[key] = obj[key]
|
|
274
|
+
return result
|
|
275
|
+
}, {})
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
process_config()
|