2023-01-05 10:30:15 +00:00
|
|
|
from typing import Dict, List, Optional, Tuple, TypedDict
|
|
|
|
|
|
|
|
from freqtrade.enums import CandleType
|
2022-10-11 19:33:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Ticker(TypedDict):
|
|
|
|
symbol: str
|
|
|
|
ask: Optional[float]
|
|
|
|
askVolume: Optional[float]
|
|
|
|
bid: Optional[float]
|
|
|
|
bidVolume: Optional[float]
|
|
|
|
last: Optional[float]
|
|
|
|
quoteVolume: Optional[float]
|
|
|
|
baseVolume: Optional[float]
|
|
|
|
# Several more - only listing required.
|
2022-10-11 19:33:02 +00:00
|
|
|
|
|
|
|
|
2023-02-15 06:01:36 +00:00
|
|
|
class OrderBook(TypedDict):
|
|
|
|
symbol: str
|
|
|
|
bids: List[Tuple[float, float]]
|
|
|
|
asks: List[Tuple[float, float]]
|
2023-02-15 06:15:54 +00:00
|
|
|
timestamp: Optional[int]
|
|
|
|
datetime: Optional[str]
|
|
|
|
nonce: Optional[int]
|
2023-02-15 06:01:36 +00:00
|
|
|
|
|
|
|
|
2022-10-11 19:33:02 +00:00
|
|
|
Tickers = Dict[str, Ticker]
|
2023-01-05 10:30:15 +00:00
|
|
|
|
2023-01-05 21:31:32 +00:00
|
|
|
# pair, timeframe, candleType, OHLCV, drop last?,
|
|
|
|
OHLCVResponse = Tuple[str, str, CandleType, List, bool]
|