chore: don't use list[0] - but next

This commit is contained in:
Matthias
2025-04-09 19:42:46 +02:00
parent 68fbab5c32
commit 0e92372b0b
4 changed files with 11 additions and 11 deletions

View File

@@ -1366,8 +1366,8 @@ class Exchange:
ordertype = available_order_Types[user_order_type]
else:
# Otherwise pick only one available
ordertype = list(available_order_Types.values())[0]
user_order_type = list(available_order_Types.keys())[0]
ordertype = next(iter(available_order_Types.values()))
user_order_type = next(iter(available_order_Types.keys()))
return ordertype, user_order_type
def _get_stop_limit_rate(self, stop_price: float, order_types: dict, side: str) -> float: