@icgio/icg-exchanges-wrapper 1.14.89 → 1.14.90

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.
@@ -1206,7 +1206,8 @@ module.exports = class Orders {
1206
1206
  }
1207
1207
  check_rates() {
1208
1208
  let process_rates = () => {
1209
- for (let pair in this.pair_exchanges) {
1209
+ let pair_list = _.concat(_.keys(this.pair_exchanges), _.keys(this.pair_exchanges_rates_only))
1210
+ for (let pair of pair_list) {
1210
1211
  let orderbook_all = {},
1211
1212
  orderbook_all_with_buy_sell_limits_against_reserve_balance = {},
1212
1213
  orderbook_major = {},
@@ -1223,7 +1224,7 @@ module.exports = class Orders {
1223
1224
  if (_.get(this.rates, [exchange, pair, 'asks'], []).length > 0 && _.get(this.rates, [exchange, pair, 'bids'], []).length > 0) {
1224
1225
  const rates = _.cloneDeep(this.rates[exchange][pair])
1225
1226
 
1226
- let major_rates_only_exchanges_length = this.major_exchanges[pair].length + _.get(this.rates_only_exchanges, [pair], []).length
1227
+ let major_rates_only_exchanges_length = _.get(this.major_exchanges, [pair], []).length + _.get(this.rates_only_exchanges, [pair], []).length
1227
1228
  if (this.major_exchanges[pair] && _.includes(this.major_exchanges[pair], exchange)) {
1228
1229
  orderbook_major_temp[exchange] = rates
1229
1230
  if (_.keys(orderbook_major_temp).length === major_rates_only_exchanges_length) {
@@ -1291,9 +1292,9 @@ module.exports = class Orders {
1291
1292
  } else {
1292
1293
  this.rates_combined_good_with_buy_sell_limits_against_reserve_balance = _.omit(this.rates_combined_good_with_buy_sell_limits_against_reserve_balance, [pair])
1293
1294
  }
1294
- if (this.pair_map_rates_only[pair] && this.rates_combined_major[pair]) {
1295
- const reference_pair = this.pair_map_rates_only[pair]
1296
- this.rates_combined_major[reference_pair] = this.rates_combined_major[pair]
1295
+ const reference_pair = this.pair_map_rates_only[pair]
1296
+ if (this.pair_map_rates_only[pair] && this.rates_combined_major[reference_pair]) {
1297
+ this.rates_combined_major[pair] = this.rates_combined_major[reference_pair]
1297
1298
  }
1298
1299
  }
1299
1300
  this.rates_observable.notify()
@@ -1311,7 +1312,7 @@ module.exports = class Orders {
1311
1312
  bids = bids.slice(0, RATES_LENGTH_MAX)
1312
1313
  _.set(this.rates, [exchange, pair], { asks, bids, update_time: new Date() })
1313
1314
  /*
1314
- * throttle to 10ms
1315
+ * throttle to 30ms
1315
1316
  */
1316
1317
  throttled_process_rates()
1317
1318
  } else if (_.get(this.rates, [exchange, pair, 'update_time']) < new Date().getTime() - this.interval_dict[exchange].rates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.14.89",
3
+ "version": "1.14.90",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {