Skip to content

Commit b9f848f

Browse files
authored
Merge pull request #967 from ccxt/private-key-check
fix(client): requireApiScret support privateKey
2 parents 9ee5469 + 7aa962a commit b9f848f

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)