@icgio/icg-exchanges-wrapper 1.21.1 → 1.21.2
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
|
@@ -1035,17 +1035,18 @@ module.exports = class Orders {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
console.log('DELETE %s: %s %s %s %s', note, exchange, pair, type, order_id)
|
|
1037
1037
|
|
|
1038
|
-
if (ws_client
|
|
1038
|
+
if (ws_client) {
|
|
1039
|
+
const internal_id = order_data.internal_id || order_data.id || order_id
|
|
1039
1040
|
ws_client.send_order({
|
|
1040
1041
|
action: 'delete',
|
|
1041
1042
|
exchange,
|
|
1042
1043
|
pair,
|
|
1043
1044
|
side: type,
|
|
1044
1045
|
order_id,
|
|
1045
|
-
internal_id
|
|
1046
|
+
internal_id,
|
|
1046
1047
|
lifecycle_seq: (order_data.lifecycle_seq || 0) + 1,
|
|
1047
1048
|
event_hrtime: process.hrtime(),
|
|
1048
|
-
data: order_data,
|
|
1049
|
+
data: { ...order_data, internal_id },
|
|
1049
1050
|
note,
|
|
1050
1051
|
})
|
|
1051
1052
|
}
|