From 3c760eacf69ab4e3ea25411b4b3835737db0f5c5 Mon Sep 17 00:00:00 2001 From: Dario Moceri <31732142+itsdeka@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:14:34 +0100 Subject: [PATCH] Nonce generation must be the same of the previous version --- bfxapi/rest/middleware/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bfxapi/rest/middleware/middleware.py b/bfxapi/rest/middleware/middleware.py index 9180841..6260640 100644 --- a/bfxapi/rest/middleware/middleware.py +++ b/bfxapi/rest/middleware/middleware.py @@ -19,7 +19,7 @@ class Middleware(object): assert isinstance(self.API_KEY, str) and isinstance(self.API_SECRET, str), \ "API_KEY and API_SECRET must be both str to call __build_authentication_headers" - nonce = str(int(time.time()) * 1000) + nonce = int(round(time.time() * 1000000)) if data == None: path = f"/api/v2/{endpoint}{nonce}" @@ -79,4 +79,4 @@ class Middleware(object): if data[1] == None or data[1] == Error.ERR_UNK or data[1] == Error.ERR_GENERIC: raise UnknownGenericError(f"The server replied to the request with a generic error with message: <{data[2]}>.") - return data \ No newline at end of file + return data