What does the $oHTTP.send do with $parameters?
I'm trying to get this to work for bittrex, But i get invalid signature when i use;
Global Const $CALG_SHA_512 = 0x0000800e
#Region Bittrex Const
Global $g_bittrexURL = "https://bittrex.com/api"
Global $g_bittrexAPIVersion = "v1.1"
#EndRegion Bittrex Const
Func BittrexQueryPrivate($sMethod, $sParameters = "")
Local $sNONCE = _GetNonce()
$sParameters = "nonce=" & $sNONCE & $sParameters
Local $sURL = StringFormat("/%s/account/%s", $g_bittrexAPIVersion, $sMethod)
Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$FullURL = $g_bittrexURL & $sURL & "?apikey=" & $g_sAPIKey & "&nonce=" & $sNONCE
Local $sSignature = HMACSHA512($g_sAPISecret, $FullURL)
;bittrex demands GET
$oHTTP.Open("GET", $FullURL, False)
$oHTTP.SetRequestHeader("apisign", _Base64EncodeMod($sSignature))
;sup with this? :
$oHTTP.Send(Binary($sParameters));
Local $sReceived = $oHTTP.ResponseText
Return $sReceived
EndFunc ;==>BittrexQueryPrivate
$FULLURL will become; https://bittrex.com/api/v1.1/account/getbalances?apikey=*APIKEYHERE*&nonce=20171002164018019
This responds with;
Balance: {"success":false,"message":"INVALID_SIGNATURE","result":null}
This also happens when i use the correct $nonce.
Func CurrentTime()
return _DateDiff('s', "1970/01/01 00:00:00", _NowCalc())
EndFunc