@icgio/icg-exchanges-wrapper 1.14.237 → 1.14.238

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.
@@ -733,6 +733,27 @@ module.exports = class Orders {
733
733
  })
734
734
  }
735
735
  })
736
+
737
+ // If CANCELING orders are no longer in open_orders, infer they are canceled.
738
+ const open_orders_ids_set = new Set(open_orders[exchange][pair].open_orders.map((o) => o.order_id))
739
+ this.get_order_info_status_all(exchange, pair, 'both', 'CANCELING').map((order_info) => {
740
+ if (!open_orders_ids_set.has(order_info.order_id)) {
741
+ this.update_order_info(
742
+ exchange,
743
+ pair,
744
+ order_info.type,
745
+ order_info.order_id,
746
+ {
747
+ status: 'CANCELED',
748
+ close_time: new Date(),
749
+ },
750
+ (order_info.order_type || '') + ' canceling-canceled-from-open-orders'
751
+ )
752
+ setTimeout(() => {
753
+ this.delete_order_info(exchange, pair, order_info.type, order_info.order_id, (order_info.order_type || '') + ' canceling-canceled-from-open-orders')
754
+ }, this.delete_finished_orders_timeout)
755
+ }
756
+ })
736
757
  }
737
758
  }
738
759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.14.237",
3
+ "version": "1.14.238",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {