Exemple #1
0
 def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry) -> None:
     """Initialize."""
     self._hass = hass
     self._config_entry = config_entry
     self._api = pykrakenapi.KrakenAPI(krakenex.API(), retry=0, crl_sleep=0)
     self.tradable_asset_pairs: dict[str, str] = {}
     self.coordinator: DataUpdateCoordinator[KrakenResponse | None] | None = None
Exemple #2
0
def initApi(key, secret):
    api = krakenex.API(key=key, secret=secret)
    k = pykrakenapi.KrakenAPI(api, retry=0, crl_sleep=0)
    return k