What is the easiest way to programmatically obtain the current USD-BTC spot price?
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.)
You could use the JSON encoded ticker data available from MtGox at: https://mtgox.com/api/0/data/ticker.php
You could try using www.btcrate.com as well, which supports additional currencies (should you need them).
There are probably dozens of sites that now provide this data, but the CoinDesk API is one option.
Our Awesome Tools
- Check your IP Address precisely
- Online JSON Formatter with Syntax Highlight
- Online CSS Minifier Compressor