From 7aa962afffd69510dfaae00600f88c320398d51c Mon Sep 17 00:00:00 2001 From: carlosmiei <43336371+carlosmiei@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:49:22 +0000 Subject: [PATCH] fix(client): requireApiScret support privateKey --- src/node-binance-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node-binance-api.ts b/src/node-binance-api.ts index 79859b78..0fc91e33 100644 --- a/src/node-binance-api.ts +++ b/src/node-binance-api.ts @@ -649,8 +649,8 @@ export default class Binance { if (fatalError) throw Error(`${source}: Invalid API Key!`); return false; } - if (!this.APISECRET) { - if (fatalError) throw Error(`${source}: Invalid API Secret!`); + if (!this.APISECRET && !this.PRIVATEKEY) { + if (fatalError) throw Error(`${source}: Invalid API Secret or Private Key!`); return false; } return true;