MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / requireApiSecret

Method requireApiSecret

src/node-binance-api.ts:690–700  ·  view source on GitHub ↗
(source = 'requireApiSecret', fatalError = true)

Source from the content-addressed store, hash-verified

688
689 // Check if API secret is present
690 requireApiSecret(source = 'requireApiSecret', fatalError = true) {
691 if (!this.APIKEY) {
692 if (fatalError) throw Error(`${source}: Invalid API Key!`);
693 return false;
694 }
695 if (!this.APISECRET && !this.PRIVATEKEY) {
696 if (fatalError) throw Error(`${source}: Invalid API Secret or Private Key!`);
697 return false;
698 }
699 return true;
700 }
701
702 /**
703 * Create a public spot/margin request

Callers 1

signedRequestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected