@icgio/icg-exchanges-wrapper 1.21.7 → 1.21.9
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 +1 -5
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -770,6 +770,7 @@ module.exports = class Orders {
|
|
|
770
770
|
const polled_filled_amount = round_amount(exchange, pair, polled_order.f_amount || 0)
|
|
771
771
|
if (local_order.status === exchange_status && local_filled_amount === polled_filled_amount) continue
|
|
772
772
|
this.log_terminal_divergence('query_order', exchange, pair, polled_order.order_id, local_order.status, exchange_status)
|
|
773
|
+
if (local_order.status === 'F-FILLED' && exchange_status === 'P-FILLED') continue
|
|
773
774
|
const merged_filled_amount = Math.max(polled_filled_amount, local_filled_amount)
|
|
774
775
|
const total_amount = round_amount(exchange, pair, local_order.t_amount || polled_order.t_amount || 0)
|
|
775
776
|
const tag = polled_order.status !== exchange_status ? ' (' + polled_order.status + ')' : ''
|
|
@@ -857,11 +858,6 @@ module.exports = class Orders {
|
|
|
857
858
|
if (!order_info) {
|
|
858
859
|
return
|
|
859
860
|
}
|
|
860
|
-
const cancel_grace_window_ms = 15 * 1000
|
|
861
|
-
const cancel_within_grace = order_info.close_time && Date.now() - order_info.close_time < cancel_grace_window_ms
|
|
862
|
-
if (!cancel_within_grace) {
|
|
863
|
-
this.log_terminal_divergence('open_orders', exchange, pair, order.order_id, order_info.status, 'N-FILLED')
|
|
864
|
-
}
|
|
865
861
|
const order_f_amount = round_amount(exchange, pair, order.f_amount)
|
|
866
862
|
const order_info_f_amount = round_amount(exchange, pair, order_info.f_amount)
|
|
867
863
|
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) {
|