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;