I would like to connect to bitvavo via API.
I lack the skills to create the rest clients and web sockets, who would like to assist me with this (for a fee)?
This example is a Restclient, i’d like to achief this with Websocket listener.
(Language = vba.net )
Public Async Function GetBitVavoPortefuille() As Task
Try
Dim TimeStamp As String = CLng((DateTime.UtcNow - #1970/01/01#).TotalMilliseconds).ToString
Dim TotalParam As String = TimeStamp & "GET/v2/balance"
Dim HashKey As String = HashString(TotalParam, BitvavoApiSecret)
Dim APIUrl As String = "https://api.bitvavo.com/v2/balance" + TotalParam + "&signature=" + HashKey
Dim Request As System.Net.HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(APIUrl), System.Net.HttpWebRequest)
Request.Headers.Add(BitvavoApiKey)
Dim Response As System.Net.HttpWebResponse = DirectCast(Request.GetResponse(), System.Net.HttpWebResponse)
Dim Read = New System.IO.StreamReader(Response.GetResponseStream).ReadToEnd
Catch ex As Exception
Stop
End Try
End Function
Public Function HashString(ByVal StringToHash As String, ByVal HachKey As String) As String
Dim myEncoder As New System.Text.UTF8Encoding
Dim Key() As Byte = myEncoder.GetBytes(HachKey)
Dim Text() As Byte = myEncoder.GetBytes(StringToHash)
Dim myHMACSHA256 As New System.Security.Cryptography.HMACSHA256(Key)
Dim HashCode As Byte() = myHMACSHA256.ComputeHash(Text)
Dim hash As String = Replace(BitConverter.ToString(HashCode), "-", "")
Return hash.ToLower
End Function
call to GetBitVavoPortefuille() end up in an error, probably incorrect header and total param ?
see documentation : https://docs.bitvavo.com/'
Please help
New contributor
jos Hillenaar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1