Dim API_Key As String
Dim API_Secret As String
Dim nonce As Int
Dim Post_URL As String
Dim sign As String
Dim API_Signed As String
Dim Byte_Conv As ByteConverter
Dim Post_Data As String
Dim uri As String
Post_URL = "https://bittrex.com/api/v1.1/account/getbalance" ' ------- bura
' Post_Data = "apikey=" & API_Key & "currency=BTC&nonce=" & nonce
' $apikey='xxx';
API_Key =apikey
' $apisecret='xxx';
API_Secret = apisecret
' $nonce=time();
nonce = DateTime.Now/1000
' $uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&nonce='.$nonce;
uri = Post_URL & "?apikey=" & API_Key &"¤cy="& selectedchart& "&nonce=" & nonce ' -------------------- Bura
' $sign=hash_hmac('sha512',$uri,$apisecret);
sign = HMACSHA512(API_Secret, uri,False)
API_Signed = Byte_Conv.HexFromBytes(sign) 'convert to HEX
API_Signed = API_Signed.ToLowerCase
Dim job_GetInfo As HttpJob
job_GetInfo.Initialize("job_GetInfo", Me)
job_GetInfo.Download2(Post_URL, _
Array As String("apikey", API_Key,"currency",selectedchart,"nonce", nonce)) ' ------------------------BURA
job_GetInfo.GetRequest().SetHeader("apisign", API_Signed)
job_GetInfo.GetRequest().SetHeader("apikey", API_Key)
'Stuff that appears unnecessary but since others use it.....
job_GetInfo.GetRequest().SetHeader("User-Agent","Mozilla/4.0 (compatible; Cryptsy API B4A client)")
'job_GetInfo.GetRequest().SetContentType("application/x-www-form-urlencoded")