From efad49ec5be6f065b2bf530a7dda6827b7a5d98b Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Wed, 19 Apr 2023 14:58:28 -0400 Subject: [PATCH] Raise ValueError if no config is found when sending authenticated headers --- piker/brokers/kucoin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index 35d9ac22..f826856e 100755 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -195,6 +195,10 @@ class Client: https://docs.kucoin.com/#authentication ''' + + if not self._config: + raise ValueError('No config found when trying to send authenticated request') + str_to_sign = ( str(int(time.time() * 1000)) + action + f'/api/{api_v}{endpoint}' )