HuobiRDCenter / huobi_Golang

Go SDK for Huobi Spot API
https://www.htx.com/zh-cn/opend/newApiPages/
Apache License 2.0
176 stars 86 forks source link

{"status":"error","err-code":"api-signature-not-valid","err-msg":"Signature not valid: Verification failure [校验失败]","data":null} #4

Closed simpdo closed 4 years ago

simpdo commented 4 years ago

first i get accont information by client.AccountClient ,when i recieve the response, i use the same account client instance to get the account balance , this time the response is a error

{"status":"error","err-code":"api-signature-not-valid","err-msg":"Signature not valid: Verification failure [校验失败]","data":null}

but when i change the code like that ` func (p *Signer) sign(payload string) string { p.hash.Write([]byte(payload)) result := base64.StdEncoding.EncodeToString(p.hash.Sum(nil))

p.hash.Reset()
return result

}` then there is no error,but i dont know whether it‘s correct

eynzhang commented 4 years ago

@simpdo , thanks for your feedback, I have fixed this idempotence issue. You can get latest code from master branch.