Refactor validExchangesType to separate types package

This commit is contained in:
Matthias
2023-06-03 09:04:40 +02:00
parent 6f928b826f
commit 54bf1634c7
4 changed files with 12 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ from ccxt import (DECIMAL_PLACES, ROUND, ROUND_DOWN, ROUND_UP, SIGNIFICANT_DIGIT
from freqtrade.exchange.common import (BAD_EXCHANGES, EXCHANGE_HAS_OPTIONAL, EXCHANGE_HAS_REQUIRED,
SUPPORTED_EXCHANGES)
from freqtrade.exchange.types import ValidExchangesType
from freqtrade.types import ValidExchangesType
from freqtrade.util import FtPrecise
from freqtrade.util.datetime_helpers import dt_from_ts, dt_ts

View File

@@ -27,14 +27,5 @@ class OrderBook(TypedDict):
Tickers = Dict[str, Ticker]
# Used for list-exchanges
class ValidExchangesType(TypedDict):
name: str
valid: bool
supported: bool
comment: str
trade_modes: List[str]
# pair, timeframe, candleType, OHLCV, drop last?,
OHLCVResponse = Tuple[str, str, CandleType, List, bool]

View File

@@ -0,0 +1 @@
from freqtrade.types.valid_exchanges_type import ValidExchangesType # noqa: F401

View File

@@ -0,0 +1,10 @@
# Used for list-exchanges
from typing import List, TypedDict
class ValidExchangesType(TypedDict):
name: str
valid: bool
supported: bool
comment: str
trade_modes: List[str]