Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the kraken integration."""
2 
3 from __future__ import annotations
4 
5 from typing import TypedDict
6 
7 
8 class KrakenResponseEntry(TypedDict):
9  """Dict describing a single response entry."""
10 
11  ask: tuple[float, float, float]
12  bid: tuple[float, float, float]
13  last_trade_closed: tuple[float, float]
14  volume: tuple[float, float]
15  volume_weighted_average: tuple[float, float]
16  number_of_trades: tuple[int, int]
17  low: tuple[float, float]
18  high: tuple[float, float]
19  opening_price: float
20 
21 
22 type KrakenResponse = dict[str, KrakenResponseEntry]
23 
24 
25 DEFAULT_SCAN_INTERVAL = 60
26 DEFAULT_TRACKED_ASSET_PAIR = "XBT/USD"
27 DISPATCH_CONFIG_UPDATED = "kraken_config_updated"
28 
29 CONF_TRACKED_ASSET_PAIRS = "tracked_asset_pairs"
30 
31 DOMAIN = "kraken"