Click here to Skip to main content
16,016,759 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,

Been a while since I was last coding, but am wanting to write a simple program in C++ that can access an API. The API is that for a online Bitcoin broker called Bitfinex. The API is documented here:

https://www.bitfinex.com/pages/api[^]

...and example code for js and Python is given here:

https://community.bitfinex.com/showwiki.php?title=Sample+API+Code[^]

But, I would like to access directly from C++. I am using VS2013. The data that I want using the API would be simply the price, bid and ask for now and I don't need to worry about the authenticated data. A c++ console application that polled the API for the prices and printed them on screen every X milliseconds would be a tremendous starting point for me to work off. I can easily adapt a very basic example, but as it stands at the moment I have zero idea where to start and cannot find anything that helps me.

From my reading I simply have to be able to make a http request and use libcurl or netlib for this. However, I am still unsure how to go about this

Happy to provide more info if needed, hope the question makes sense.

Kind regards

Mark
Posted
Updated 13-Jan-14 11:24am
v2
Comments
H.Brydon 13-Jan-14 22:59pm    
If you hit a web server every few milliseconds, the service provider will shut you down. Torturing somebody else's machine like that is bad juju and the provider will notice this almost immediately.

Anything more than once a minute is in the range of denial of service attack.

I don't think you want that...
Mark Briscombe 14-Jan-14 8:40am    
Yep, aware of this, when I said x milliseconds I was going to be using somewhere north of 1000...probably more like 5000 to be honest. The site has guidelines which they accept.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900