@icgio/icg-exchanges-wrapper 1.14.93 → 1.14.95

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.
@@ -104,7 +104,7 @@ module.exports = class Orders {
104
104
  this.no_arb_exchanges = settings.no_arb_exchanges || []
105
105
  this.buy_sell_limits_threshold = 0.95
106
106
  this.p_filled_threshold = 0
107
- this.f_filled_threshold = 0.99
107
+ this.f_filled_threshold = 0.999
108
108
  this.previous_orders_canceled = false
109
109
  this.previous_orders_canceled_exchange_pair = {}
110
110
  this.account_init = false
@@ -489,6 +489,7 @@ module.exports = class Orders {
489
489
  trades[exchange][pair].trades.map((trade) => {
490
490
  if (_.get(this.order_info, [exchange, pair, trade.type, trade.order_id])) {
491
491
  let order_info = this.order_info[exchange][pair][trade.type][trade.order_id]
492
+ trade.amount = round_amount(_.upperFirst(exchange.replace('_2', '')), pair, trade.amount)
492
493
  if (_.includes(['CANCELED', 'CANCELING'], order_info.status) && trade.amount > order_info.f_amount) {
493
494
  let type = trade.type,
494
495
  order_id = trade.order_id
@@ -649,6 +650,7 @@ module.exports = class Orders {
649
650
  open_orders[exchange][pair].open_orders.map((order) => {
650
651
  if (_.get(this.order_info, [exchange, pair, order.type, order.order_id])) {
651
652
  let order_info = this.order_info[exchange][pair][order.type][order.order_id]
653
+ order.f_amount = round_amount(_.upperFirst(exchange.replace('_2', '')), pair, order.f_amount)
652
654
  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) {
653
655
  // this.info_log('ORDERS: %s %s ORDER F-FILLED', exchange, pair)
654
656
  this.update_order_info(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.14.93",
3
+ "version": "1.14.95",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {