Fix problem when limit is > max allowed limit

This commit is contained in:
Matthias
2020-10-13 20:38:02 +02:00
parent 8165cc11df
commit 07da21e633
2 changed files with 4 additions and 2 deletions

View File

@@ -1077,7 +1077,7 @@ class Exchange:
"""
if not limit_range:
return limit
return min([x for x in limit_range if limit <= x])
return min([x for x in limit_range if limit <= x] + [max(limit_range)])
@retrier
def fetch_l2_order_book(self, pair: str, limit: int = 100) -> dict: