From 208a8e5d7ae5042e37e795324bf985db728a6f7d Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Mon, 3 Apr 2023 20:12:25 -0400 Subject: [PATCH] Remove unecessary config vars --- piker/brokers/kucoin.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index cb225387..a205c31e 100644 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -182,19 +182,7 @@ class Client: def __init__(self) -> None: self._pairs: dict[str, KucoinMktPair] = {} self._bars: list[list[float]] = [] - self._key_id: str - self._key_secret: str - self._key_passphrase: str - self._authenticated: bool = False - - config: BrokerConfig | None = get_config() - - if config and config.key_id and config.key_secret and config.key_passphrase: - self._authenticated = True - self._key_id = config.key_id - self._key_secret = config.key_secret - self._key_passphrase = config.key_passphrase - log.info('User credentials added') + self._config: BrokerConfig | None = get_config() def _gen_auth_req_headers( self, @@ -247,7 +235,7 @@ class Client: Generic request wrapper for Kucoin API ''' - if self._authenticated: + if self._config: headers = self._gen_auth_req_headers(action, endpoint, api_v) api_url = f'https://api.kucoin.com/api/{api_v}{endpoint}'