Closed SimonLeiner closed 2 weeks ago
Hi @SimonLeiner
All of these algorithms still produce strings which can be used just like the typical HMAC keys. Did you experience any blockers to using Nautilus with these other key types?
Hey @cjdsellers !
I couldn't make it work with RSA or Ed25519 Keys. I looked a bit into it and in https://github.com/nautechsystems/nautilus_trader/blob/develop/nautilus_trader/adapters/binance/http/client.py
def _get_sign(self, data: str) -> str:
m = hmac.new(self._secret.encode(), data.encode(), hashlib.sha256)
return m.hexdigest()
it handles the hmac accordingly. However there is no function that Handles for E.g RSA Keys like
def _rsa_signature(self, query_string: str):
assert self.PRIVATE_KEY
h = SHA256.new(query_string.encode("utf-8"))
signature = pkcs1_15.new(self.PRIVATE_KEY).sign(h)
return b64encode(signature).decode()
taken from: https://github.com/sammchardy/python-binance/blob/master/binance/client.py
Thanks!
Hi, can i work on this please?
Hi @NextThread
Sure thing!
Feature Request
Instead of the typical HMAC Keys, Binance also Supports Ed25519 and RSA Keys.
"It is highly recommended to use Ed25519 API keys as it should provide the best performance and security out of all supported key types."
(Definitely not the most urgent enhancement, but a nice feature)
References: