fix: Don't log error when positions are empty in bybit gw
This particular error log was intended for failed position requests. Since an empty list evaluates to false in python, we were incorrectly interpreting an empty result as a failed request.
This commit is contained in:
1 parent
5af98658d8
commit
a022f08b49
1 file changed
+1
-1
@@ -634,7 +634,7 @@ class BybitExecutionGateway(ExecutionGateway):
|
||||
if time.time() > next_pos_snapshot_time:
|
||||
positions = self.get_positions()
|
||||
next_pos_snapshot_time = time.time() + POS_SNAPSHOT_INTERVAL
|
||||
if positions:
|
||||
if positions is not None:
|
||||
self.logger.info("[bybit_gw_pos_infos.json]%s" % positions)
|
||||
bridge.on_position_info(positions)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user