mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 07:26:47 +00:00
Prevent authenticated calls when authenticated API support is disabled
This commit is contained in:
@@ -286,6 +286,10 @@ func (a *ANX) GetDepositAddress(currency, name string, new bool) (string, error)
|
||||
}
|
||||
|
||||
func (a *ANX) SendAuthenticatedHTTPRequest(path string, params map[string]interface{}, result interface{}) error {
|
||||
if !a.AuthenticatedAPISupport {
|
||||
return fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, a.Name)
|
||||
}
|
||||
|
||||
request := make(map[string]interface{})
|
||||
request["nonce"] = strconv.FormatInt(time.Now().UnixNano(), 10)[0:13]
|
||||
path = fmt.Sprintf("api/%s/%s", ANX_API_VERSION, path)
|
||||
|
||||
Reference in New Issue
Block a user