@icgio/icg-exchanges-wrapper 1.14.3 → 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 +16 -4
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -413,16 +413,28 @@ module.exports = class Orders {
|
|
|
413
413
|
return this.order_info
|
|
414
414
|
}
|
|
415
415
|
get_order_info_all_stats() {
|
|
416
|
-
let info_all = this.get_order_info_all()
|
|
417
|
-
|
|
416
|
+
let info_all = this.get_order_info_all()
|
|
417
|
+
let stats = []
|
|
418
418
|
for (let exchange in info_all) {
|
|
419
419
|
for (let pair in info_all[exchange]) {
|
|
420
420
|
for (let type in info_all[exchange][pair]) {
|
|
421
|
-
|
|
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
|
+
}
|
|
422
434
|
}
|
|
423
435
|
}
|
|
424
436
|
}
|
|
425
|
-
return
|
|
437
|
+
return stats
|
|
426
438
|
}
|
|
427
439
|
get_order_info_by_order_type(order_type) {
|
|
428
440
|
let order_info_temp = {}
|