Skip to content

Commit 7aa962a

Browse files
committed
fix(client): requireApiScret support privateKey
1 parent 50a6aa7 commit 7aa962a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node-binance-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ export default class Binance {
649649
if (fatalError) throw Error(`${source}: Invalid API Key!`);
650650
return false;
651651
}
652-
if (!this.APISECRET) {
653-
if (fatalError) throw Error(`${source}: Invalid API Secret!`);
652+
if (!this.APISECRET && !this.PRIVATEKEY) {
653+
if (fatalError) throw Error(`${source}: Invalid API Secret or Private Key!`);
654654
return false;
655655
}
656656
return true;

0 commit comments

Comments
 (0)