In Python, I have this:
signature = hmac.new(secret_key.encode(“utf-8”), message.encode(“utf-8”), hashlib.sha256).hexdigest()
Does anybody know the SQL Server (T-SQL) equivilant? Encode with utf8, apply hmac256 to that and then hexdigest?
In Python, I have this:
signature = hmac.new(secret_key.encode(“utf-8”), message.encode(“utf-8”), hashlib.sha256).hexdigest()
Does anybody know the SQL Server (T-SQL) equivilant? Encode with utf8, apply hmac256 to that and then hexdigest?
Hi @Hawkster! Thank you for using Advanced Trading API. We see you are asking for help with the above posted code. Can you please elaborate the issue you are facing or the help you need?
I just can’t get it to work with SQL (T-SQL). I get “Unautorized”. It works with the python code above. I was hoping to find the SQL equivalent.
Thanks
Just to confirm you need help with the signature generation part but in SQL, correct?
That is correct. Any help is appreciated.
Hi @Hawkster! Thank you for your patience. Unfortunately we do not have the knowledge of t-sql to help you with signature generation. May be this doc can help. We would suggest to ask this in a community of t-sql users. Do let us know in case you have any more questions or feedbacks that you want to share.