@icgio/icg-exchanges-wrapper 1.14.4 → 1.14.5
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 +22 -17
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -413,23 +413,28 @@ 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
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
416
|
+
let info_all = this.get_order_info_all()
|
|
417
|
+
let stats = []
|
|
418
|
+
for (let exchange in info_all) {
|
|
419
|
+
for (let pair in info_all[exchange]) {
|
|
420
|
+
for (let type in info_all[exchange][pair]) {
|
|
421
|
+
for (let order_id in info_all[exchange][pair][type]) {
|
|
422
|
+
let order = info_all[exchange][pair][type][order_id]
|
|
423
|
+
stats.push({
|
|
424
|
+
exchange: exchange,
|
|
425
|
+
pair: pair,
|
|
426
|
+
type: type.toUpperCase(),
|
|
427
|
+
order_id: order_id,
|
|
428
|
+
price: order.price || 'N/A',
|
|
429
|
+
amount: order.amount || 0,
|
|
430
|
+
f_amount: order.f_amount || 0,
|
|
431
|
+
t_amount: order.t_amount || 0,
|
|
432
|
+
})
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return stats
|
|
433
438
|
}
|
|
434
439
|
get_order_info_by_order_type(order_type) {
|
|
435
440
|
let order_info_temp = {}
|