Add more backoff to fetch_order endpoint

This commit is contained in:
Matthias 2020-08-02 10:24:10 +02:00
parent 6c77feee85
commit 3915101d2d
4 changed files with 6 additions and 4 deletions

View File

@ -1008,7 +1008,7 @@ class Exchange:
return order
@retrier
@retrier(retries=5)
def fetch_order(self, order_id: str, pair: str) -> Dict:
if self._config['dry_run']:
try:

View File

@ -78,7 +78,7 @@ class Ftx(Exchange):
except ccxt.BaseError as e:
raise OperationalException(e) from e
@retrier
@retrier(retries=5)
def fetch_stoploss_order(self, order_id: str, pair: str) -> Dict:
if self._config['dry_run']:
try:

View File

@ -1896,10 +1896,10 @@ def test_fetch_order(default_conf, mocker, exchange_name):
assert tm.call_args_list[1][0][0] == 2
assert tm.call_args_list[2][0][0] == 5
assert tm.call_args_list[3][0][0] == 10
assert api_mock.fetch_order.call_count == API_RETRY_COUNT + 1
assert api_mock.fetch_order.call_count == 6
ccxt_exceptionhandlers(mocker, default_conf, api_mock, exchange_name,
'fetch_order', 'fetch_order',
'fetch_order', 'fetch_order', retries=6,
order_id='_', pair='TKN/BTC')
@ -1932,6 +1932,7 @@ def test_fetch_stoploss_order(default_conf, mocker, exchange_name):
ccxt_exceptionhandlers(mocker, default_conf, api_mock, exchange_name,
'fetch_stoploss_order', 'fetch_order',
retries=6,
order_id='_', pair='TKN/BTC')

View File

@ -154,4 +154,5 @@ def test_fetch_stoploss_order(default_conf, mocker):
ccxt_exceptionhandlers(mocker, default_conf, api_mock, 'ftx',
'fetch_stoploss_order', 'fetch_orders',
retries=6,
order_id='_', pair='TKN/BTC')