@icgio/icg-exchanges-wrapper 1.21.23 → 1.21.24
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 +3 -2
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -857,6 +857,7 @@ module.exports = class Orders {
|
|
|
857
857
|
}
|
|
858
858
|
for (let exchange in open_orders) {
|
|
859
859
|
for (let pair in open_orders[exchange]) {
|
|
860
|
+
const init_orders = this.check_init_order_opened ? this.get_order_info_status_all(exchange, pair, 'both', 'INIT') : []
|
|
860
861
|
open_orders[exchange][pair].open_orders.map((order) => {
|
|
861
862
|
if (_.get(this.order_info, [exchange, pair, order.type, order.order_id])) {
|
|
862
863
|
let order_info = this.order_info[exchange][pair][order.type][order.order_id]
|
|
@@ -905,8 +906,8 @@ module.exports = class Orders {
|
|
|
905
906
|
order_info.order_type + ' order-p-filled-2',
|
|
906
907
|
)
|
|
907
908
|
}
|
|
908
|
-
} else if (
|
|
909
|
-
|
|
909
|
+
} else if (init_orders.length > 0) {
|
|
910
|
+
init_orders.forEach((init_order) => {
|
|
910
911
|
let init_order_price = round_price(exchange, pair, init_order.price)
|
|
911
912
|
let order_price = round_price(exchange, pair, order.price)
|
|
912
913
|
let init_order_time = typeof init_order.open_time === 'number' ? init_order.open_time : new Date(init_order.open_time).getTime()
|