@icgio/icg-exchanges-wrapper 1.9.102 → 1.9.103

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.
@@ -223,7 +223,7 @@ module.exports = class Orders {
223
223
  limit_trade((res) => {
224
224
  if (res.success) {
225
225
  let order_id = res.body
226
- this.delete_order_info(exchange, pair, method, id, 'limit-trade-success')
226
+ this.delete_order_info(exchange, pair, method, id, order_type + ' n-filled')
227
227
  this.update_order_info(
228
228
  exchange,
229
229
  pair,
@@ -246,10 +246,10 @@ module.exports = class Orders {
246
246
  order_type + ' n-filled'
247
247
  )
248
248
  } else if (res.error === 'amount-too-small' || res.error === 'insufficient-funds') {
249
- this.delete_order_info(exchange, pair, method, id, 'limit-trade-' + res.error)
249
+ this.delete_order_info(exchange, pair, method, id, order_type + ' limit-trade-' + res.error)
250
250
  } else {
251
251
  if (order_type.startsWith('self') || order_type.startsWith('maker_2')) {
252
- this.delete_order_info(exchange, pair, method, id, 'limit-trade-timeout-' + order_type)
252
+ this.delete_order_info(exchange, pair, method, id, order_type + ' limit-trade-timeout')
253
253
  }
254
254
  // else if (_.get(this.order_info, [exchange, pair, method, id, 'status']) === 'INIT') { // make sure no_callback_timeout is NOT running zero
255
255
  // this.update_order_info(exchange, pair, method, id, {
@@ -297,7 +297,7 @@ module.exports = class Orders {
297
297
  order.order_type + ' canceled'
298
298
  )
299
299
  setTimeout(() => {
300
- this.delete_order_info(exchange, pair, order.type, order.order_id, 'cancel-order-success')
300
+ this.delete_order_info(exchange, pair, order.type, order.order_id, order.order_type + ' cancel-order-success')
301
301
  }, this.delete_finished_orders_timeout)
302
302
  } else if (!res.success && res.error === 'order-not-open' && original_status !== 'CANCELED') {
303
303
  // this.info_log('%s ORDER CANNOT BE CANCELED: %j', original_status, order)
@@ -316,7 +316,7 @@ module.exports = class Orders {
316
316
  order.order_type + ' cannot-be-canceled'
317
317
  )
318
318
  setTimeout(() => {
319
- this.delete_order_info(exchange, pair, order.type, order.order_id, 'cannot-be-canceled')
319
+ this.delete_order_info(exchange, pair, order.type, order.order_id, order.order_type + 'cannot-be-canceled')
320
320
  }, this.delete_finished_orders_timeout)
321
321
  } else {
322
322
  console.error('cancel order:', exchange, pair, order, res)
@@ -396,7 +396,7 @@ module.exports = class Orders {
396
396
  order_info.order_type + ' canceled-order-filled'
397
397
  )
398
398
  setTimeout(() => {
399
- this.delete_order_info(exchange, pair, type, order_id, 'canceled-order-filled')
399
+ this.delete_order_info(exchange, pair, type, order_id, order.order_type + ' canceled-order-filled')
400
400
  }, this.delete_finished_orders_timeout)
401
401
  } else if (order_info.status === 'F-FILLED' && trade.amount > order_info.f_amount) {
402
402
  // this.info_log('TRADES: FILLED ORDER FILLED MORE', trade, order_info)
@@ -434,7 +434,7 @@ module.exports = class Orders {
434
434
  order_info.order_type + ' order-f-filled-1'
435
435
  )
436
436
  setTimeout(() => {
437
- this.delete_order_info(exchange, pair, order_info.type, order_info.order_id, 'f-filled-trades')
437
+ this.delete_order_info(exchange, pair, order_info.type, order_info.order_id, order.order_type + ' order-f-filled-1')
438
438
  }, this.delete_finished_orders_timeout)
439
439
  } else if (
440
440
  _.includes(['N-FILLED', 'P-FILLED'], order_info.status) &&
@@ -495,7 +495,7 @@ module.exports = class Orders {
495
495
  order_info_order.order_type + ' order-f-filled-2'
496
496
  )
497
497
  setTimeout(() => {
498
- this.delete_order_info(exchange, pair, order_info_order.type, order_info_order.order_id, 'f-filled-no-trades-function')
498
+ this.delete_order_info(exchange, pair, order_info_order.type, order_info_order.order_id, order_info_order.order_type + ' order-f-filled-2')
499
499
  }, this.delete_finished_orders_timeout)
500
500
  }
501
501
  }
@@ -525,7 +525,7 @@ module.exports = class Orders {
525
525
  order_info.order_type + ' order-f-filled-3'
526
526
  )
527
527
  setTimeout(() => {
528
- this.delete_order_info(exchange, pair, order_info.type, order_info.order_id, 'f-filled-open-orders')
528
+ this.delete_order_info(exchange, pair, order_info.type, order_info.order_id, order_info.order_type + ' order-f-filled-3')
529
529
  }, this.delete_finished_orders_timeout)
530
530
  } else if (
531
531
  _.includes(['N-FILLED', 'P-FILLED'], order_info.status) &&
@@ -560,7 +560,7 @@ module.exports = class Orders {
560
560
  order_time - init_order_time < this.check_init_order_opened_timeout
561
561
  ) {
562
562
  // this.info_log('ORDERS: %s %s %s %s INIT ORDER OPENED', init_order.order_id, order.order_id, exchange, pair)
563
- this.delete_order_info(exchange, pair, init_order.type, init_order.order_id, 'init-order-opened')
563
+ this.delete_order_info(exchange, pair, init_order.type, init_order.order_id, init_order.order_type + ' init-order-opened')
564
564
  this.update_order_info(
565
565
  exchange,
566
566
  pair,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.9.102",
3
+ "version": "1.9.103",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {