It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
Sub TestPOSTBTCe()
Dim APIkey As String
Dim SecretKey As String
Dim NonceUnique As Long
Dim postData As String
Dim SecretKeyByte() As Byte
Dim messagebyte() As Byte
Dim Sign As String
NonceUnique = DateDiff("s", "1/1/1970", Now)
'BTC-e
TradeApiSite = "https://btc-e.com/tapi/"
APIkey = "THIS IS WHERE YOUR API-key goes"
SecretKey = "And here goes your private key"
postData = "method=getInfo&nonce=" & NonceUnique
Sign = HexHash(postData, SecretKey, "SHA512")
' Instantiate a WinHttpRequest object and open it
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)
objHTTP.WaitForResponse
Debug.Print postData, "-", objHTTP.ResponseText
Set objHTTP = Nothing
'{"success":0,"error":"invalid sign"}
'{"success":1,"return":{"funds":{"usd":0,etc.
End Sub
Function HexHash(ByVal clearText As String, ByVal key As String, Meth As String) As String
Dim hashedBytes() As Byte
Dim i As Integer
hashedBytes = computeHash(clearText, key, Meth)
HexHash = ""
For i = 0 To UBound(hashedBytes)
HexHash = HexHash & LCase(HEX(hashedBytes(i)))
Next
End Function
Function computeHash(ByVal clearText As String, ByVal key As String, Meth As String) As Byte()
Dim BKey() As Byte
Dim BTxt() As Byte
BTxt = StrConv(clearText, vbFromUnicode)
BKey = StrConv(key, vbFromUnicode)
If Meth = "SHA512" Then
Set SHAhasher = CreateObject("System.Security.Cryptography.HMACSHA512")
SHAhasher.key = BKey
computeHash = SHAhasher.computeHash_2(BTxt)
ElseIf Meth = "SHA256" Then
Set SHAhasher = CreateObject("System.Security.Cryptography.HMACSHA256")
SHAhasher.key = BKey
computeHash = SHAhasher.computeHash_2(BTxt)
Else
Set SHAhasher = CreateObject("System.Security.Cryptography.HMACSHA1")
SHAhasher.key = BKey
computeHash = SHAhasher.computeHash_2(BTxt)
End If
End Function
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)