Prevent authenticated calls when authenticated API support is disabled

This commit is contained in:
Adrian Gallagher
2017-08-21 13:10:57 +10:00
parent 4f34b58d55
commit 4eaa9d0ec9
21 changed files with 93 additions and 6 deletions

View File

@@ -314,6 +314,10 @@ func (b *Bittrex) GetDepositHistory(currency string) ([]WithdrawalHistory, error
// SendAuthenticatedHTTPRequest sends an authenticated http request to a desired
// path
func (b *Bittrex) SendAuthenticatedHTTPRequest(path string, values url.Values, result interface{}) (err error) {
if !b.AuthenticatedAPISupport {
return fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, b.Name)
}
nonce := strconv.FormatInt(time.Now().UnixNano(), 10)
values.Set("apikey", b.APIKey)
values.Set("apisecret", b.APISecret)