From af69b886ba428fbf11001920a2ce8a260e0e7993 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 7 Dec 2022 07:20:47 +0000 Subject: [PATCH] Add debug statement in crossfilter --- core/lib/market.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/lib/market.py b/core/lib/market.py index 3f4eab5..9a923d7 100644 --- a/core/lib/market.py +++ b/core/lib/market.py @@ -30,6 +30,12 @@ def crossfilter(account, symbol, direction, func): if func == "entry": return {"action": "rejected", "positions": opposing_position_info} elif func == "exit": + log.debug( + ( + f"Found {opposing_position_info['units']} units of " + f"{symbol} on side {opposing_side}" + ) + ) # Pass back opposing side so we can close it return { "action": "close",