I am trying to base64 encode the signature as descried in these docs here: https://docs.gdax.com/#signing-a-message In python3 i am able to generate the simple base64 encoded signature here:
timestamp = ‘1525790592’
message = timestamp + ‘GET’ + ‘/fills’
message = message.encode(‘ascii’)
hmac_key = base64.b64decode(secret_key)
print(hmac_key)
print(message)
signature = hmac.new(hmac_key, message, hashlib.sha256)
signature_b64 = base64.b64encode(signature.digest()).decode(‘utf-8’).rstrip(‘\n’)
In Q, I have tried what I do with binance via the folllowing using qcrypt https://github.com/tjcelaya/qcrypt:
hmac:qcrypt 2: (
hmac;3);
nonceGen:{[str]
nonce:hmac[skey; str; “sha256”];
nonce: “” sv string nonce;
:nonce;
};
however I do not think this does the proper base64 decoding of the secret key or the base64 encoding of the signature. Any Idea on how to do this effectively?