Method
requireApiSecret
(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 |
Tested by
no test coverage detected