toorop / go-bittrex

Go binding for the Bittrex crypto-currency exchange API.
MIT License
230 stars 101 forks source link

401 Unauthorized and INVALID_SIGNATURE on Linux #64

Open dematron opened 3 years ago

dematron commented 3 years ago

Hello. While using your project I find a very strange behavior of this part of code in client.go preSignatura := []string{strconv.Itoa(int(nonce)), req.URL.String(), method, payloadHash} If I run my project on macOS - everything is normal, but when I try to run the same code on Linux (f.e. Raspbian on RPi4), I've got 401 Unauthorized and INVALID_SIGNATURE in debug. Response is like this [381487000 https://api.bittrex.com/v3/balances GET hashed_part_here] Very strange timestamp. I found that if I refactor your code like this preSignatura := []string{fmt.Sprintf("%d", nonce), req.URL.String(), method, payloadHash} everything work perfect and response is correct. May be you know why it's working so strange?

PierreRAFFA commented 2 years ago

It looks like the issue is still there for linux

toorop commented 2 years ago

Can someone make a PR ? Thx.