11

E.g., if I wanted to create a cron script that would grab the latest spot price every hour and store it in a local file or database, what would be the place to "scrape" that information from?

(Actually writing the script is not the problem, in my case.)

Nicolas Kaiser
  • 379
  • 4
  • 14
Chris W.
  • 230
  • 1
  • 7
  • FYI, I ended up using the [API of BitcoinCharts.com](http://bitcoincharts.com/about/markets-api/) to do this. The Mt Gox API may have worked just as well in my case, but for whatever reason, I was having an issue with my (Python) script that attempted to poll mtgox.com -- it would hang upon making the HTTPS request. – Chris W. Oct 31 '11 at 14:18

3 Answers3

10

You could use the JSON encoded ticker data available from MtGox at: https://mtgox.com/api/0/data/ticker.php

Just use whatever your language's equivalent to cURL or wGet is and parse as appropriate.

David Perry
  • 14,330
  • 5
  • 62
  • 99
  • Unsurprisingly (to anyone familiar with the now-infamous Mt Gox saga), this method will no longer work. – Chris W. Dec 23 '17 at 01:15
5

You could try using www.btcrate.com as well, which supports additional currencies (should you need them).

D.H.
  • 5,297
  • 3
  • 32
  • 45
user632
  • 51
  • 1
0

There are probably dozens of sites that now provide this data, but the CoinDesk API is one option.

Chris W.
  • 230
  • 1
  • 7