diff --git a/cbpro/cbpro_auth.py b/cbpro/cbpro_auth.py index db6561fe..fe0f6fda 100644 --- a/cbpro/cbpro_auth.py +++ b/cbpro/cbpro_auth.py @@ -14,8 +14,12 @@ def __init__(self, api_key, secret_key, passphrase): def __call__(self, request): timestamp = str(time.time()) - message = ''.join([timestamp, request.method, - request.path_url, (request.body or '')]) + message = ( + timestamp + + request.method + + request.path_url + + (request.body or b"").decode() + ) request.headers.update(get_auth_headers(timestamp, message, self.api_key, self.secret_key,