mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 04:41:15 +00:00
32 lines
757 B
Python
32 lines
757 B
Python
from typing import Dict, List, Optional, Tuple, TypedDict
|
|
|
|
from freqtrade.enums import CandleType
|
|
|
|
|
|
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]
|
|
percentage: Optional[float]
|
|
# Several more - only listing required.
|
|
|
|
|
|
class OrderBook(TypedDict):
|
|
symbol: str
|
|
bids: List[Tuple[float, float]]
|
|
asks: List[Tuple[float, float]]
|
|
timestamp: Optional[int]
|
|
datetime: Optional[str]
|
|
nonce: Optional[int]
|
|
|
|
|
|
Tickers = Dict[str, Ticker]
|
|
|
|
# pair, timeframe, candleType, OHLCV, drop last?,
|
|
OHLCVResponse = Tuple[str, str, CandleType, List, bool]
|