Hi all,
I'm trying to get a POST command to work on BTC-e, but keep getting an "invalid sign" response. My GET on the public API works like a charm. So I'm wondering if my SHA512 calculation is messed up (working in VBA/Excel) or if I'm doing something else wrong? My main question would be: with APIKey "MyApiKey", SecretKey "MySecretKey" and postdata being "method=getInfo&nonce=1390391080", is my Sign correct?
For test purposes:
APIkey = "MyApiKey" (yes, this should be something else)
SecretKey = "MySecretKey" (this too)
TradeApiSite = "
https://btc-e.com/tapi"
postData= "method=getInfo&nonce=1390391080"
And the resulting calculated Sign:
Sign (SHA512): 6DmHCo3HxkiSZSC577vx7pycF2bKvRHP4JATBxpxiGAyqVSFFeUuKlteJ6l2GyZ0XwJfffU/nZnJmWAtPrmvHA==
And the bit of code I use:
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objHTTP.Open "POST", TradeApiSite, False
objHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.SetRequestHeader "Key", APIkey
objHTTP.SetRequestHeader "Sign", Sign
objHTTP.Send (postData)
And the result:
{"success":0,"error":"invalid sign"}
Thanks for any pointers,
Koen