From 9d9565a9af64727d7d578a03ccc239305590f5d4 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 14 Dec 2020 14:50:04 +0000 Subject: [PATCH] accessing position.id instead of pid --- bfxbot/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfxbot/models.py b/bfxbot/models.py index a05be84..d9156fb 100644 --- a/bfxbot/models.py +++ b/bfxbot/models.py @@ -130,7 +130,7 @@ class SymbolStatus: if self.current_tick == 1: return None - return next(filter(lambda x: x.pid == pid, self.positions[self.current_tick - 1])) + return next(filter(lambda x: x.position.id == pid, self.positions[self.current_tick - 1])) async def __add_event__(self, event: Event): self.events.append(event)