Bitcoin Forum
October 18, 2017, 08:18:02 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Connecting to trade APIs in R?  (Read 745 times)
RobertJK
Newbie
*
Offline Offline

Activity: 6


View Profile
August 12, 2011, 04:21:14 PM
 #1

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:

 <Code>

> 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

</Code>

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?
1508314682
Hero Member
*
Offline Offline

Posts: 1508314682

View Profile Personal Message (Offline)

Ignore
1508314682
Reply with quote  #2

1508314682
Report to moderator
1508314682
Hero Member
*
Offline Offline

Posts: 1508314682

View Profile Personal Message (Offline)

Ignore
1508314682
Reply with quote  #2

1508314682
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508314682
Hero Member
*
Offline Offline

Posts: 1508314682

View Profile Personal Message (Offline)

Ignore
1508314682
Reply with quote  #2

1508314682
Report to moderator
1508314682
Hero Member
*
Offline Offline

Posts: 1508314682

View Profile Personal Message (Offline)

Ignore
1508314682
Reply with quote  #2

1508314682
Report to moderator
TheBanker
Member
**
Offline Offline

Activity: 70


View Profile
August 12, 2011, 08:53:29 PM
 #2

My advice is to learn a real language Smiley
RobertJK
Newbie
*
Offline Offline

Activity: 6


View Profile
August 13, 2011, 01:16:23 AM
 #3

I actually have a good amount of experience with a bunch of other languages... I just wanted to use R for its statistical upper-hand on virtually ever other language. So no dice on R advice? I guess R's not too popular with the BTC crowd, then Sad
drawoc
Full Member
***
Offline Offline

Activity: 168

Firstbits: 175wn


View Profile
August 13, 2011, 02:59:27 AM
 #4

In file(con, "r") : unsupported URL scheme

The URL scheme is, in this case https. This means that R doesn't have https support. Google suggests looking into the package RCurl.

Note that I've never programmed in R before.

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!