From 933511f430fe3da198b7654acfae95f1eb4e70d5 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Mon, 18 Aug 2025 18:54:38 +0000 Subject: [PATCH] fix: Reset last filled qty to 0 on updates with no fills in bybit gw For example, on status change updates. --- .../python_interop_plugins/bybit_execution_gateway.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib_python_interop/python_interop_plugins/bybit_execution_gateway.py b/src/lib_python_interop/python_interop_plugins/bybit_execution_gateway.py index d54ff4fcb..7fad9c61e 100644 --- a/src/lib_python_interop/python_interop_plugins/bybit_execution_gateway.py +++ b/src/lib_python_interop/python_interop_plugins/bybit_execution_gateway.py @@ -164,6 +164,8 @@ class OrderData: lfp = round(lfp, 7) self.last_filled_price = lfp self.last_filled_quantity = lfq + else: + self.last_filled_quantity = 0 self.filled_quantity = filled_quantity self.avg_filled_price = avg_filled_price match status: