stable/freqtrade/exchange/types.py

31 lines
725 B
Python
Raw Normal View History

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.
2023-02-15 06:01:36 +00:00
class OrderBook(TypedDict):
symbol: str
bids: List[Tuple[float, float]]
asks: List[Tuple[float, float]]
timestamp: Optional[int]
datetime: Optional[str]
nonce: Optional[int]
2023-02-15 06:01:36 +00:00
Tickers = Dict[str, Ticker]
2023-01-05 10:30:15 +00:00
# pair, timeframe, candleType, OHLCV, drop last?,
OHLCVResponse = Tuple[str, str, CandleType, List, bool]