Post
Topic
Board Beginners & Help
Topic OP
Connecting to trade APIs in R?
by
RobertJK
on 12/08/2011, 16:21:14 UTC
Does anyone have advice on connecting to the trade APIs through R? It looks like R doesn't support the URl structure for APIs like TradeHill etc... I'm trying to work with the ReadLines function but to no avail... I simply get output that looks like this:

 

> readLines("https://api.tradehill.com/APIv1/USD/Orderbook")
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : unsupported URL scheme



I've deduced that this function needs a file suffix (ie it would have to be something like orderbook.php) to be able to download the data.

Does anyone have any workarounds that they've used, and/or does anyone have any tricks for connecting to these APIs using R?