mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 15:10:44 +00:00
Prevent authenticated calls when authenticated API support is disabled
This commit is contained in:
@@ -509,6 +509,10 @@ func (k *Kraken) CancelOrder(orderID int64) {
|
||||
}
|
||||
|
||||
func (k *Kraken) SendAuthenticatedHTTPRequest(method string, values url.Values) (interface{}, error) {
|
||||
if !k.AuthenticatedAPISupport {
|
||||
return nil, fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, k.Name)
|
||||
}
|
||||
|
||||
path := fmt.Sprintf("/%s/private/%s", KRAKEN_API_VERSION, method)
|
||||
values.Set("nonce", strconv.FormatInt(time.Now().UnixNano(), 10))
|
||||
secret, err := common.Base64Decode(k.APISecret)
|
||||
|
||||
Reference in New Issue
Block a user