@icgio/icg-exchanges-wrapper 1.14.138 → 1.14.139
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 -1
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -641,7 +641,6 @@ module.exports = class Orders {
|
|
|
641
641
|
open_orders[exchange][pair].open_orders.map((order) => {
|
|
642
642
|
if (_.get(this.order_info, [exchange, pair, order.type, order.order_id])) {
|
|
643
643
|
let order_info = this.order_info[exchange][pair][order.type][order.order_id]
|
|
644
|
-
order.f_amount = round_amount(exchange, pair, order.f_amount)
|
|
645
644
|
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) {
|
|
646
645
|
// console.log('ORDERS: %s %s ORDER F-FILLED', exchange, pair)
|
|
647
646
|
this.update_order_info(
|
|
@@ -728,6 +727,10 @@ module.exports = class Orders {
|
|
|
728
727
|
for (let key in dict) {
|
|
729
728
|
if (key === 'f_percentage') {
|
|
730
729
|
dict[key] = Math.round(dict[key] * 100) / 100
|
|
730
|
+
} else if (key === 'price') {
|
|
731
|
+
dict[key] = round_price(exchange, pair, dict[key])
|
|
732
|
+
} else if (key === 'amount' || key === 'f_amount' || key === 't_amount' || key === 'total') {
|
|
733
|
+
dict[key] = round_amount(exchange, pair, dict[key])
|
|
731
734
|
}
|
|
732
735
|
_.setWith(this.order_info, `${exchange}.${pair}.${type}.${order_id}.${key}`, dict[key], Object)
|
|
733
736
|
}
|