From a6fd34dac2e29c0573e04c7af078bc96eaab7670 Mon Sep 17 00:00:00 2001 From: Eirik Narjord Date: Sat, 12 Oct 2024 10:56:19 -0400 Subject: [PATCH] add missing fill; suppress debug message --- src/exchanges/bybit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exchanges/bybit.py b/src/exchanges/bybit.py index 5d82f254e..fb8067224 100644 --- a/src/exchanges/bybit.py +++ b/src/exchanges/bybit.py @@ -429,7 +429,10 @@ async def fetch_pnls(self, start_time=None, end_time=None, limit=None): if x["orderId"] in fillsd: fillsd[x["orderId"]][-1]["pnl"] = x["pnl"] else: - logging.info(f"debug missing order id in fills {x['orderId']}") + # logging.info(f"debug missing order id in fills {x['orderId']} {x}") + x["info"] = {"execId": uuid4().hex} + x["id"] = x["orderId"] + fillsd[x["orderId"]] = [x] joined = {x["info"]["execId"]: x for x in flatten(fillsd.values())} return sorted(joined.values(), key=lambda x: x["timestamp"])