@icgio/icg-exchanges-wrapper 1.14.2 → 1.14.4
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/middleware/orders.js +17 -10
- package/package.json +2 -2
package/middleware/orders.js
CHANGED
|
@@ -413,16 +413,23 @@ module.exports = class Orders {
|
|
|
413
413
|
return this.order_info
|
|
414
414
|
}
|
|
415
415
|
get_order_info_all_stats() {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
416
|
+
const info_all = this.get_order_info_all()
|
|
417
|
+
return Object.entries(info_all).reduce((exchange_stats, [exchange, pairs]) => {
|
|
418
|
+
exchange_stats[exchange] = Object.entries(pairs).reduce((pair_stats, [pair, types]) => {
|
|
419
|
+
pair_stats[pair] = Object.entries(types).reduce((type_stats, [type, orders]) => {
|
|
420
|
+
type_stats[type] = Object.entries(orders).map(([order_id, order]) => ({
|
|
421
|
+
order_id: order_id,
|
|
422
|
+
price: order.price,
|
|
423
|
+
amount: order.amount,
|
|
424
|
+
f_amount: order.f_amount,
|
|
425
|
+
t_amount: order.t_amount,
|
|
426
|
+
}))
|
|
427
|
+
return type_stats
|
|
428
|
+
}, {})
|
|
429
|
+
return pair_stats
|
|
430
|
+
}, {})
|
|
431
|
+
return exchange_stats
|
|
432
|
+
}, {})
|
|
426
433
|
}
|
|
427
434
|
get_order_info_by_order_type(order_type) {
|
|
428
435
|
let order_info_temp = {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icgio/icg-exchanges-wrapper",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/icgio/icg-exchanges-wrapper#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@icgio/icg-exchanges": "^1.32.
|
|
20
|
+
"@icgio/icg-exchanges": "^1.32.3",
|
|
21
21
|
"@icgio/icg-exchanges-data": "^1.10.2",
|
|
22
22
|
"@icgio/icg-utils": "^1.9.0",
|
|
23
23
|
"influx": "^5.10.0",
|