Bitcoin Forum
May 11, 2024, 01:40:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: I Need a Newbs Noob Guide to Accessing the Mt Gox API  (Read 4563 times)
bb113 (OP)
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
February 18, 2012, 02:35:02 AM
 #21

yea I figured that out. Right now I am trying to get the grab ticker "command" to repeat once a minute. Revalin's code didn't work for me. Then figure out how to only display the last price from the ticker.

Do you know why R crashes if I don't include useragent= "R"?

*well I should say I don't really get the make.dataframe part yet
1715434815
Hero Member
*
Offline Offline

Posts: 1715434815

View Profile Personal Message (Offline)

Ignore
1715434815
Reply with quote  #2

1715434815
Report to moderator
1715434815
Hero Member
*
Offline Offline

Posts: 1715434815

View Profile Personal Message (Offline)

Ignore
1715434815
Reply with quote  #2

1715434815
Report to moderator
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715434815
Hero Member
*
Offline Offline

Posts: 1715434815

View Profile Personal Message (Offline)

Ignore
1715434815
Reply with quote  #2

1715434815
Report to moderator
stochastic
Hero Member
*****
Offline Offline

Activity: 532
Merit: 500


View Profile
February 18, 2012, 02:54:42 AM
 #22

yea I figured that out. Right now I am trying to get the grab ticker "command" to repeat once a minute. Revalin's code didn't work for me. Then figure out how to only display the last price from the ticker.

Do you know why R crashes if I don't include useragent= "R"?

*well I should say I don't really get the make.dataframe part yet


Yea that is interesting about it crashing.  There is a short thing about it on the RCurl FAQ.

Introducing constraints to the economy only serves to limit what can be economical.
stochastic
Hero Member
*****
Offline Offline

Activity: 532
Merit: 500


View Profile
February 18, 2012, 03:01:35 AM
 #23


Right now I am trying to get the grab ticker "command" function to repeat once a minute... Then figure out how to only display the last price from the ticker.


You need to set up a cron.  I don't know how to do that in Windows.  But in unix-like system it is easy.  First you need to make an Rscript.  This is just a file saying what you want R to do in a .R format.  It would be cool to have it make a tweet with the current ticker.  There is the twitteR package.  I was playing around with this before.

Also, you could try just have R run in a loop.  Have R run the ticker function, print out the data, then have it wait x seconds and do it again.

I think adding a tweet or email using a cron job is better.  Let me know if you need help with the cron setup.

to do the last price:

Code:
      x <- MT.BTCUSD()
      x$last
      [1] 4.4639

Introducing constraints to the economy only serves to limit what can be economical.
stochastic
Hero Member
*****
Offline Offline

Activity: 532
Merit: 500


View Profile
February 20, 2012, 11:56:44 AM
 #24

Here is a site that explains and also makes a cron job:

http://htmlbasix.com/crontab.shtml

Introducing constraints to the economy only serves to limit what can be economical.
bb113 (OP)
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
February 22, 2012, 08:55:05 AM
 #25

Thanks, working on this in my spare time so it may be a bit. I will report back.
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!