Skip to content

Commit

Permalink
feat: The find function in the OrdersState class has been updated…
Browse files Browse the repository at this point in the history
… to search for a partial match in order IDs.
  • Loading branch information
morteza-koohgard committed Aug 17, 2024
1 parent ec87b12 commit d9c75fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jesse/store/state_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_order_by_id(self, exchange: str, symbol: str, id: str, use_exchange_id:
if use_exchange_id:
return fnc.find(lambda o: o.exchange_id == id, self.storage[key])

return fnc.find(lambda o: o.id == id, reversed(self.storage[key]))
return fnc.find(lambda o: id in o.id, reversed(self.storage[key]))

def get_entry_orders(self, exchange: str, symbol: str) -> List[Order]:
# return all orders if position is not opened yet
Expand Down

0 comments on commit d9c75fa

Please sign in to comment.