BfxRest: add auth and public endpoints

This commit is contained in:
Jacob Plaster
2018-12-04 15:40:36 +00:00
parent 0db3fa2f64
commit 8a63d36159
2 changed files with 58 additions and 10 deletions

View File

@@ -17,8 +17,6 @@ def generate_auth_payload(API_KEY, API_SECRET):
def generate_auth_headers(API_KEY, API_SECRET, path, body):
nonce = str(_gen_nonce())
signature = "/api/v2/{}{}{}".format(path, nonce, body)
print (API_KEY)
print (API_SECRET)
h = hmac.new(API_SECRET.encode('utf8'), signature.encode('utf8'), hashlib.sha384)
signature = h.hexdigest()