mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
chore: reduce retry count for stop orders
This commit is contained in:
parent
566c0c8f72
commit
0a68b0515c
|
@ -13,7 +13,7 @@ from freqtrade.exceptions import (
|
||||||
TemporaryError,
|
TemporaryError,
|
||||||
)
|
)
|
||||||
from freqtrade.exchange import Exchange, date_minus_candles
|
from freqtrade.exchange import Exchange, date_minus_candles
|
||||||
from freqtrade.exchange.common import API_FETCH_ORDER_RETRY_COUNT, retrier
|
from freqtrade.exchange.common import API_RETRY_COUNT, retrier
|
||||||
from freqtrade.exchange.exchange_types import FtHas
|
from freqtrade.exchange.exchange_types import FtHas
|
||||||
from freqtrade.misc import safe_value_fallback2
|
from freqtrade.misc import safe_value_fallback2
|
||||||
from freqtrade.util import dt_now, dt_ts
|
from freqtrade.util import dt_now, dt_ts
|
||||||
|
@ -208,7 +208,7 @@ class Okx(Exchange):
|
||||||
order["type"] = "stoploss"
|
order["type"] = "stoploss"
|
||||||
return order
|
return order
|
||||||
|
|
||||||
@retrier(retries=API_FETCH_ORDER_RETRY_COUNT)
|
@retrier(retries=API_RETRY_COUNT)
|
||||||
def fetch_stoploss_order(self, order_id: str, pair: str, params: Optional[Dict] = None) -> Dict:
|
def fetch_stoploss_order(self, order_id: str, pair: str, params: Optional[Dict] = None) -> Dict:
|
||||||
if self._config["dry_run"]:
|
if self._config["dry_run"]:
|
||||||
return self.fetch_dry_run_order(order_id)
|
return self.fetch_dry_run_order(order_id)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import pytest
|
||||||
|
|
||||||
from freqtrade.enums import CandleType, MarginMode, TradingMode
|
from freqtrade.enums import CandleType, MarginMode, TradingMode
|
||||||
from freqtrade.exceptions import RetryableOrderError, TemporaryError
|
from freqtrade.exceptions import RetryableOrderError, TemporaryError
|
||||||
from freqtrade.exchange.common import API_FETCH_ORDER_RETRY_COUNT
|
from freqtrade.exchange.common import API_RETRY_COUNT
|
||||||
from freqtrade.exchange.exchange import timeframe_to_minutes
|
from freqtrade.exchange.exchange import timeframe_to_minutes
|
||||||
from tests.conftest import EXMS, get_patched_exchange, log_has
|
from tests.conftest import EXMS, get_patched_exchange, log_has
|
||||||
from tests.exchange.test_exchange import ccxt_exceptionhandlers
|
from tests.exchange.test_exchange import ccxt_exceptionhandlers
|
||||||
|
@ -621,7 +621,7 @@ def test_fetch_stoploss_order_okx_exceptions(default_conf_usdt, mocker):
|
||||||
"okx",
|
"okx",
|
||||||
"fetch_stoploss_order",
|
"fetch_stoploss_order",
|
||||||
"fetch_order",
|
"fetch_order",
|
||||||
retries=API_FETCH_ORDER_RETRY_COUNT + 1,
|
retries=API_RETRY_COUNT + 1,
|
||||||
order_id="12345",
|
order_id="12345",
|
||||||
pair="ETH/USDT",
|
pair="ETH/USDT",
|
||||||
)
|
)
|
||||||
|
@ -638,7 +638,7 @@ def test_fetch_stoploss_order_okx_exceptions(default_conf_usdt, mocker):
|
||||||
"okx",
|
"okx",
|
||||||
"fetch_stoploss_order",
|
"fetch_stoploss_order",
|
||||||
"fetch_open_orders",
|
"fetch_open_orders",
|
||||||
retries=API_FETCH_ORDER_RETRY_COUNT + 1,
|
retries=API_RETRY_COUNT + 1,
|
||||||
order_id="12345",
|
order_id="12345",
|
||||||
pair="ETH/USDT",
|
pair="ETH/USDT",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user