refactor: split okx fetch stop fallback

This commit is contained in:
Matthias
2024-09-24 20:02:55 +02:00
parent 333f2cb472
commit 566c0c8f72

View File

@@ -1,6 +1,6 @@
import logging
from datetime import timedelta
from typing import Any, Dict, List, Optional, Tuple
from typing import Any, Dict, List, Optional, Tuple, Union
import ccxt
@@ -229,6 +229,9 @@ class Okx(Exchange):
except ccxt.BaseError as e:
raise OperationalException(e) from e
return self._fetch_stop_order_fallback(order_id, pair)
def _fetch_stop_order_fallback(self, order_id: str, pair: str) -> Dict:
params2 = {"stop": True, "ordType": "conditional"}
for method in (
self._api.fetch_open_orders,