Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dim c as new CURLSMBS
- dim apikey as string = //apikey
- dim apisecret as string = //secretKey
- dim nonceDate as date
- nonceDate = new date
- dim nonce as string = str(nonceDate.TotalSeconds)
- dim uri as string = cryptsyApiUrl
- dim postData as string = "&method=getinfo&nonce=" + nonce
- dim uriMemBlock as MemoryBlock = postData
- dim sign as string = EncodeHex(Crypto.HMAC(apiSecret, uriMemBlock, Crypto.Algorithm.SHA512), false)
- sign = sign.replace("-", "")
- c.SetOptionHTTPheader array("Sign: " + sign, "Key: " + apiKey)
- c.OptionURL = uri
- c.OptionPostFields = postData
- c.SetOptionHTTPheader array("Sign: " + sign, "Key: " + apiKey)
- c.OptionVerbose = true
- c.CollectDebugData = true
- c.CollectOutputData = true
- c.OptionSSLVerifyHost = 0
- c.OptionSSLVerifyPeer = 0
- dim e as integer = c.Perform
- dim data as string = c.OutputData
- return c.OutputData
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement