From 13df3e70d5284cae5ab14cd680802d57a71aed8c Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Mon, 3 Apr 2023 20:14:25 -0400 Subject: [PATCH] Refactor sign gen into one line --- piker/brokers/kucoin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index a205c31e..f3aee52f 100644 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -195,9 +195,7 @@ class Client: https://docs.kucoin.com/#authentication ''' - now = int(time.time() * 1000) - path = f'/api/{api_v}{endpoint}' - str_to_sign = str(now) + action + path + str_to_sign = str(int(time.time() * 1000)) + action + f'/api/{api_v}{endpoint}' signature = base64.b64encode( hmac.new(