@icgio/icg-exchanges-wrapper 1.14.124 → 1.14.126
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 +20 -21
- package/package.json +2 -2
package/middleware/orders.js
CHANGED
|
@@ -417,29 +417,28 @@ module.exports = class Orders {
|
|
|
417
417
|
get_order_info_all() {
|
|
418
418
|
return this.order_info
|
|
419
419
|
}
|
|
420
|
-
|
|
421
|
-
let info_all = this.get_order_info_all()
|
|
420
|
+
get_order_info_stats(exchange, pair, order_type) {
|
|
422
421
|
let stats = []
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
exchange: exchange,
|
|
430
|
-
pair: pair,
|
|
431
|
-
type: type,
|
|
432
|
-
order_id: order_id,
|
|
433
|
-
order_type: order.order_type,
|
|
434
|
-
status: order.status,
|
|
435
|
-
price: order.price,
|
|
436
|
-
amount: order.amount,
|
|
437
|
-
f_amount: order.f_amount,
|
|
438
|
-
t_amount: order.t_amount,
|
|
439
|
-
open_time: order.open_time,
|
|
440
|
-
})
|
|
441
|
-
}
|
|
422
|
+
let info_all = _.get(this.order_info, [exchange, pair], {})
|
|
423
|
+
for (let type in info_all) {
|
|
424
|
+
for (let order_id in info_all[type]) {
|
|
425
|
+
let order = info_all[type][order_id]
|
|
426
|
+
if (order_type && order.order_type !== order_type) {
|
|
427
|
+
continue
|
|
442
428
|
}
|
|
429
|
+
stats.push({
|
|
430
|
+
exchange: exchange,
|
|
431
|
+
pair: pair,
|
|
432
|
+
type: type,
|
|
433
|
+
order_id: order_id,
|
|
434
|
+
order_type: order.order_type,
|
|
435
|
+
status: order.status,
|
|
436
|
+
price: order.price,
|
|
437
|
+
amount: order.amount,
|
|
438
|
+
f_amount: order.f_amount,
|
|
439
|
+
t_amount: order.t_amount,
|
|
440
|
+
open_time: order.open_time,
|
|
441
|
+
})
|
|
443
442
|
}
|
|
444
443
|
}
|
|
445
444
|
return stats
|
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.126",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@icgio/icg-exchanges": "^1.32.69",
|
|
21
21
|
"@icgio/icg-exchanges-data": "^1.10.60",
|
|
22
|
-
"@icgio/icg-utils": "^1.9.
|
|
22
|
+
"@icgio/icg-utils": "^1.9.24",
|
|
23
23
|
"influx": "^5.10.0",
|
|
24
24
|
"lodash": "^4.17.20",
|
|
25
25
|
"uuid": "^11.1.0",
|