@icgio/icg-exchanges-wrapper 1.12.60 → 1.12.61
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.
- package/middleware/orders.js +2 -1
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -87,6 +87,7 @@ module.exports = class Orders {
|
|
|
87
87
|
this.account_init = false
|
|
88
88
|
this.cmc_curs = settings.cmc_curs || []
|
|
89
89
|
this.cmc_source = settings.cmc_source || 'coingecko'
|
|
90
|
+
this.accounting_benchmark = settings.accounting_benchmark
|
|
90
91
|
this.balance_benchmark = settings.balance_benchmark || {}
|
|
91
92
|
this.min_reserve_balance = settings.min_reserve_balance || {}
|
|
92
93
|
for (let exchange in exchange_pairs) {
|
|
@@ -740,7 +741,7 @@ module.exports = class Orders {
|
|
|
740
741
|
}
|
|
741
742
|
if (!this.account_init && _.keys(this.balances).length === _.keys(this.exchange_pairs).length) {
|
|
742
743
|
this.account_init = true
|
|
743
|
-
this.init_account(this.balances, this.balance_benchmark)
|
|
744
|
+
this.init_account(this.balances, this.accounting_benchmark || this.balance_benchmark) // use accounting_benchmark if it exists
|
|
744
745
|
}
|
|
745
746
|
} else if (_.get(this.balances, [exchange, 'update_time']) < new Date().getTime() - this.interval_dict[exchange].balances) {
|
|
746
747
|
this.info_log('%s balances expired: %j', exchange, res)
|