@icgio/icg-exchanges-wrapper 1.21.5 → 1.21.6

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.
@@ -851,13 +851,17 @@ 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
854
855
  open_orders[exchange][pair].open_orders.map((order) => {
855
856
  if (_.get(this.order_info, [exchange, pair, order.type, order.order_id])) {
856
857
  let order_info = this.order_info[exchange][pair][order.type][order.order_id]
857
858
  if (!order_info) {
858
859
  return
859
860
  }
860
- this.log_terminal_divergence('open_orders', exchange, pair, order.order_id, order_info.status, 'N-FILLED')
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
+ }
861
865
  const order_f_amount = round_amount(exchange, pair, order.f_amount)
862
866
  const order_info_f_amount = round_amount(exchange, pair, order_info.f_amount)
863
867
  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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.21.5",
3
+ "version": "1.21.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {