@icgio/icg-exchanges-wrapper 1.21.6 → 1.21.8
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 +0 -5
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -851,17 +851,12 @@ module.exports = class Orders {
|
|
|
851
851
|
}
|
|
852
852
|
for (let exchange in open_orders) {
|
|
853
853
|
for (let pair in open_orders[exchange]) {
|
|
854
|
-
const snapshot_update_time = open_orders[exchange][pair].update_time ? new Date(open_orders[exchange][pair].update_time).getTime() : 0
|
|
855
854
|
open_orders[exchange][pair].open_orders.map((order) => {
|
|
856
855
|
if (_.get(this.order_info, [exchange, pair, order.type, order.order_id])) {
|
|
857
856
|
let order_info = this.order_info[exchange][pair][order.type][order.order_id]
|
|
858
857
|
if (!order_info) {
|
|
859
858
|
return
|
|
860
859
|
}
|
|
861
|
-
const cancel_after_snapshot = order_info.close_time && order_info.close_time > snapshot_update_time
|
|
862
|
-
if (!cancel_after_snapshot) {
|
|
863
|
-
this.log_terminal_divergence('open_orders', exchange, pair, order.order_id, order_info.status, 'N-FILLED')
|
|
864
|
-
}
|
|
865
860
|
const order_f_amount = round_amount(exchange, pair, order.f_amount)
|
|
866
861
|
const order_info_f_amount = round_amount(exchange, pair, order_info.f_amount)
|
|
867
862
|
if (_.includes(['N-FILLED', 'P-FILLED'], order_info.status) && order_f_amount > order_info_f_amount && order_f_amount / order_info.t_amount > this.f_filled_threshold) {
|