mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve some exchange logs
This commit is contained in:
parent
99bfa839eb
commit
6c77feee85
|
@ -1022,10 +1022,10 @@ class Exchange:
|
|||
return self._api.fetch_order(order_id, pair)
|
||||
except ccxt.OrderNotFound as e:
|
||||
raise RetryableOrderError(
|
||||
f'Order not found (id: {order_id}). Message: {e}') from e
|
||||
f'Order not found (pair: {pair} id: {order_id}). Message: {e}') from e
|
||||
except ccxt.InvalidOrder as e:
|
||||
raise InvalidOrderException(
|
||||
f'Tried to get an invalid order (id: {order_id}). Message: {e}') from e
|
||||
f'Tried to get an invalid order (pair: {pair} id: {order_id}). Message: {e}') from e
|
||||
except ccxt.DDoSProtection as e:
|
||||
raise DDosProtection(e) from e
|
||||
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
||||
|
|
|
@ -2315,6 +2315,18 @@ def test_calculate_fee_rate(mocker, default_conf, order, expected) -> None:
|
|||
(3, 3, 1),
|
||||
(0, 1, 2),
|
||||
(1, 1, 1),
|
||||
(0, 4, 17),
|
||||
(1, 4, 10),
|
||||
(2, 4, 5),
|
||||
(3, 4, 2),
|
||||
(4, 4, 1),
|
||||
(0, 5, 26),
|
||||
(1, 5, 17),
|
||||
(2, 5, 10),
|
||||
(3, 5, 5),
|
||||
(4, 5, 2),
|
||||
(5, 5, 1),
|
||||
|
||||
])
|
||||
def test_calculate_backoff(retrycount, max_retries, expected):
|
||||
assert calculate_backoff(retrycount, max_retries) == expected
|
||||
|
|
Loading…
Reference in New Issue
Block a user