@icgio/icg-exchanges-wrapper 1.9.105 → 1.9.107
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 +4 -3
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -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,
|
|
399
|
+
this.delete_order_info(exchange, pair, type, order_id, order_info.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)
|
|
@@ -1003,14 +1003,15 @@ module.exports = class Orders {
|
|
|
1003
1003
|
if (_.get(this.rates, [exchange, pair, 'asks'], []).length > 0 && _.get(this.rates, [exchange, pair, 'bids'], []).length > 0) {
|
|
1004
1004
|
let rates = JSON.parse(JSON.stringify(this.rates[exchange][pair]))
|
|
1005
1005
|
|
|
1006
|
+
let major_rates_only_exchanges_length = this.major_exchanges[pair].length + _.get(this.rates_only_exchanges, [pair], []).length
|
|
1006
1007
|
if (this.major_exchanges[pair] && _.includes(this.major_exchanges[pair], exchange)) {
|
|
1007
1008
|
orderbook_major_temp[exchange] = rates
|
|
1008
|
-
if (_.keys(orderbook_major_temp).length ===
|
|
1009
|
+
if (_.keys(orderbook_major_temp).length === major_rates_only_exchanges_length) {
|
|
1009
1010
|
orderbook_major = orderbook_major_temp
|
|
1010
1011
|
}
|
|
1011
1012
|
} else if (this.rates_only_exchanges[pair] && _.includes(this.rates_only_exchanges[pair], exchange)) {
|
|
1012
1013
|
orderbook_major_temp[exchange] = rates
|
|
1013
|
-
if (_.keys(orderbook_major_temp).length ===
|
|
1014
|
+
if (_.keys(orderbook_major_temp).length === major_rates_only_exchanges_length) {
|
|
1014
1015
|
orderbook_major = orderbook_major_temp
|
|
1015
1016
|
}
|
|
1016
1017
|
}
|