mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-22 15:10:13 +00:00
Prevent authenticated calls when authenticated API support is disabled
This commit is contained in:
@@ -409,6 +409,10 @@ func (a *Alphapoint) SendRequest(method, path string, data map[string]interface{
|
||||
}
|
||||
|
||||
func (a *Alphapoint) SendAuthenticatedHTTPRequest(method, path string, data map[string]interface{}, result interface{}) error {
|
||||
if !a.AuthenticatedAPISupport {
|
||||
return fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, a.Name)
|
||||
}
|
||||
|
||||
headers := make(map[string]string)
|
||||
headers["Content-Type"] = "application/json"
|
||||
data["apiKey"] = a.APIKey
|
||||
|
||||
Reference in New Issue
Block a user