Fortunately for us, most of the mining pools, exchanges and other crypto currency related sites all seem to have REST API’s available. This is fantastic. And if you like Google Spreadsheets like me, you can call those REST API’s directly from a spreadsheet. Two ways that I’ve started using this great tip:
- Get up to date Mt. Gox BTC USD rate into a spreadsheet
- Get various Alt. Coin BTC rates from Cryptsy into a spreadsheet
Both Gox and Cryptsy have public REST API’s available. Sites like CoinWarz also have REST API’s. CaVirtex will hopefully have Customer API’s available and hopefully at least a public BTC/CAD rate API call.
But before we can call any of those, we need to implement a JSON Import function.
- In your Google Spreadsheet, click Tools -> Script Manager.
- Click “New” in the Script Manager
- Select “Spreadsheet” when asked what you would like to create the script for.
- Save it.
- Then in a cell you can call the new importJSON function.
For example, to get the real-time Mt. Gox BTC/USD rate into a cell, use the following in a cell:
=ImportJSON("http://data.mtgox.com/api/1/BTCUSD/ticker", "/return/last/display_short", "noInherit,noTruncate,noHeaders")
Another example: get the latest BTC rate for DOGE coin from Cryptsy:
=ImportJSON("http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=132", "/return/markets/DOGE/lasttradeprice", "noInherit,noTruncate,noHeaders")
You could also use this to get all your trade info from Cryptsy, using the private API with an API key that you create in your account settings. This would be useful as I find that the Cryptsy page is particularly slow loading at times. Coinex.pw and Coins-E also have similar lag issues (although I don’t think Coinex has introduced an API since their upgrade).
Many of the MPOS based mining pools also have API’s available. And then there’s all the juicy info exposed in the CoinWarz REST API’s. I suppose one could track all kinds of goodness with this technique.
Hope it helps!