@icgio/icg-exchanges-wrapper 1.14.232 → 1.14.233
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 +5 -1
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -765,7 +765,11 @@ module.exports = class Orders {
|
|
|
765
765
|
this.order_info[exchange][pair][type] = _.omit(this.order_info[exchange][pair][type], [order_id])
|
|
766
766
|
console.log('DELETE %s: %s %s %s %s', note, exchange, pair, type, order_id)
|
|
767
767
|
// Store deletion to PostgreSQL (non-blocking)
|
|
768
|
-
|
|
768
|
+
// Keep final F-FILLED / P-FILLED states in DB (do NOT mark them as DELETED)
|
|
769
|
+
if (order_data.status === 'F-FILLED' || order_data.status === 'P-FILLED') {
|
|
770
|
+
} else {
|
|
771
|
+
this.all_orders_store.store(exchange, pair, type, order_id, { ...order_data, status: 'DELETED' }, note)
|
|
772
|
+
}
|
|
769
773
|
}
|
|
770
774
|
check_balances() {
|
|
771
775
|
let balances_handler = (exchange, res) => {
|