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:
@@ -245,6 +245,10 @@ func (g *Gemini) PostHeartbeat() (bool, error) {
|
||||
}
|
||||
|
||||
func (g *Gemini) SendAuthenticatedHTTPRequest(method, path string, params map[string]interface{}, result interface{}) (err error) {
|
||||
if !g.AuthenticatedAPISupport {
|
||||
return fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, g.Name)
|
||||
}
|
||||
|
||||
request := make(map[string]interface{})
|
||||
request["request"] = fmt.Sprintf("/v%s/%s", GEMINI_API_VERSION, path)
|
||||
request["nonce"] = time.Now().UnixNano()
|
||||
|
||||
Reference in New Issue
Block a user