Refactor sign gen into one line

small_kucoin_fixes
jaredgoldman 2023-04-03 20:14:25 -04:00
parent 208a8e5d7a
commit 13df3e70d5
1 changed files with 1 additions and 3 deletions

View File

@ -195,9 +195,7 @@ class Client:
https://docs.kucoin.com/#authentication https://docs.kucoin.com/#authentication
''' '''
now = int(time.time() * 1000) str_to_sign = str(int(time.time() * 1000)) + action + f'/api/{api_v}{endpoint}'
path = f'/api/{api_v}{endpoint}'
str_to_sign = str(now) + action + path
signature = base64.b64encode( signature = base64.b64encode(
hmac.new( hmac.new(