@icgio/icg-exchanges-wrapper 1.21.22 → 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.
@@ -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 (this.get_order_info_status_all(exchange, pair, 'both', 'INIT') && this.check_init_order_opened) {
909
- this.get_order_info_status_all(exchange, pair, 'both', 'INIT').map((init_order) => {
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()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.21.22",
3
+ "version": "1.21.24",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://github.com/icgio/icg-exchanges-wrapper#readme",
19
19
  "dependencies": {
20
- "@icgio/icg-exchanges": "^1.45.11",
20
+ "@icgio/icg-exchanges": "^1.45.12",
21
21
  "@icgio/icg-utils": "^1.9.62",
22
22
  "lodash": "^4.17.23",
23
23
  "pg": "^8.17.2"