Đã hoàn thành

Basic function to access VirCurEx using Excel (VBA)

I would like a module programmed in Excels Visual Basic Applications that will access the [url removed, login to view] API and get the balances on the account.

The way the API works is that that the parameters are passed in the URL. Refer to the following link for information.

[url removed, login to view]

The data in the link needs to be encoded using SHA2. The following example code may help. However use any other code that you can find that will perform the SHA2 function.

SHA2 VBA Script

[url removed, login to view]

The final code should look something like this. However can be changed if required. The important thing is that you program the GetBalances function to obtain the balances and return the data. The data does not need to be formatted at all, as long as I can see the data can be retrieved I can format it to my needs later on.

sub GetBalance ()

ID = ID + 1

RetData = GetBalances (SecurityWord,UserName,ID)

msgbox RetData

end sub

To answer some of the questions.
Here is cut and paste from the vircurex website

Calculation of the Token
The token is calculated by concatenating the input parameters, separated by a semi-colon and then calculating a SHA2 hash over the complete string. See the column "Token calculation" in the above function API list for the required fields that need to be included to calculate the hash.
Here an examples (in Ruby) for creating an order:

t = Time.now.gmtime.strftime("%Y-%m-%dT%H:%M:%S")
trx_id = Digest::SHA2.hexdigest("#{t}-#{rand}")
user_name = "MY_USER_NAME"
secret_word = "123456789"
tok = Digest::SHA2.hexdigest("#{secret_word};#{user_name};#{t};#{trx_id};create_order;sell;10;btc;50;nmc")

def self.call_https(my_url,my_params)
uri = URI.parse(my_url)
http = Net::HTTP.new(uri.host, '443')
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.start do |http|
cmd = my_params
req = Net::HTTP::Get.new(cmd)
response = http.request(req)
resp = response.body
return ActiveSupport::JSON.decode(resp)

This code creates an order using the api. Essentially once any function is coded it is a simple matter to change the paramterss to access any other functions. I choose the get balances function as I thought it would be simple.

Essentially if you can convert this code from ruby to vba this is the project done.

In order to do this, Vircurex requires a reigstered user on the web site.
Once registered, select the settings option at the top left and then select API.

You need to activate the API that you want to use which involves ticking the option and then entering is a password. Once done press save and vircurex will give you a message telling you that it was sucessfull.

Kĩ năng: Visual Basic cho Ứng dụng

Xem nhiều hơn: visual basic applications, vircurex vba code, vircurex api example, visual basic for applications, visual basic algorithm example, visual basic algorithm, algorithm in visual basic, algorithm function, algorithm applications, vbscript for, find in vba, excel vba long, excel vba help, excel 2013 vba, end vba, can you ru it, Visual Basic Excel, vba access excel, excel visual basic, excel vba script, Excel to Access, excel function, excel api vba, look algorithm program, 2013 visual basic applications excel

Về Bên Thuê:
( 2 nhận xét ) NSW, Australia

ID dự án: #4545773

Được trao cho:


I'd love to offer a solution to this project. Refer PM for details :)

$80 USD trong 1 ngày
(1 Nhận xét)

3 freelancer đang chào giá trung bình $115 cho công việc này


VBA developer since 1997. Well experienced with APIs, too. Regards, Svet.

$150 USD trong 3 ngày
(4 Nhận xét)

Hi VBA expert here...I will deliver high quality code on short time... thanks for considering my proposal

$115 USD trong 2 ngày
(0 Nhận xét)