@icgio/icg-exchanges-wrapper 1.9.179 → 1.9.181

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.
@@ -208,7 +208,7 @@ module.exports = class Orders {
208
208
  update_non_initial_from_balances(balances) {
209
209
  this.account.update_non_initial_from_balances(balances)
210
210
  }
211
- limit_trade(exchange, pair, method, price, amount, id = uuid(), order_type = '', limiter_on = true) {
211
+ limit_trade(exchange, pair, method, price, amount, id = uuid(), order_type = '', limiter_on = true, api_key_index) {
212
212
  price = round_price(_.upperFirst(exchange), pair, price)
213
213
  amount = round_amount(_.upperFirst(exchange), pair, amount)
214
214
  this.info_log('%s %s %s %s %s %s at %s', limiter_on, order_type, exchange, pair, method, amount, price)
@@ -272,6 +272,9 @@ module.exports = class Orders {
272
272
  this.Exchanges[exchange].limit_trade_base(pair, method, price, amount, cb)
273
273
  }
274
274
  }
275
+ if (api_key_index) {
276
+ this.Exchanges[exchange].key_index = api_key_index
277
+ }
275
278
  limit_trade((res) => {
276
279
  if (res.success) {
277
280
  let order_id = res.body
@@ -297,7 +300,7 @@ module.exports = class Orders {
297
300
  },
298
301
  order_type + ' n-filled'
299
302
  )
300
- } else if (res.error === 'amount-too-small' || res.error === 'insufficient-funds') {
303
+ } else if (res.error === 'amount-too-small' || res.error === 'insufficient-funds' || res.error === 'connection-error') {
301
304
  this.delete_order_info(exchange, pair, method, id, order_type + ' limit-trade-' + res.error)
302
305
  } else {
303
306
  if (order_type.startsWith('self') || order_type.startsWith('maker_2')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.9.179",
3
+ "version": "1.9.181",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {