def _headers(self, path, nonce, body):
signature = "/api/" + path + nonce + body
pprint("Signing: " + signature)
h = hmac.new(self.SECRET.encode('utf8'), signature.encode('utf8'), hashlib.sha384)
signature = h.hexdigest()
return {
"content-type": "application/json",
"bfx-nonce": nonce,
"bfx-apikey": self.KEY,
"bfx-signature": signature,
}
评论列表
文章目录