Skip to content

Commit

Permalink
add missing fill; suppress debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Oct 12, 2024
1 parent edb10eb commit a6fd34d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/exchanges/bybit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down

0 comments on commit a6fd34d

Please sign in to comment.