BitShares Forum
Other => Random Discussion => Topic started by: Chartist on March 10, 2014, 08:29:34 am
-
Hey, quick question. I created an excel spreadsheet to track my portfolio. I was wondering if anyone knew if there is a way to import price data from exchanges like Cryptsy, Bter, and bitcoinwisdom, and have real-time price data update the exchange rates so I don't have to manually update it. Any help would be very much appreciated.
-
http://data.bter.com/api (http://data.bter.com/api)
https://www.cryptsy.com/pages/api (https://www.cryptsy.com/pages/api)
-
http://data.bter.com/api (http://data.bter.com/api)
https://www.cryptsy.com/pages/api (https://www.cryptsy.com/pages/api)
Thanks for your reply. Where I'm having problems is knowing how to use the API's. I've tried playing with the Cryptsy API and did some reading in the Help section of excel, but I can't get it to work. Does anyone here have any experience with this stuff?
-
checkout www.cryptofolio.info
-
checkout www.cryptofolio.info
Oh, cool! Thanks. I'll play around with that later when I get home.
-
If you use Google Spreadsheets, you can use this general script to import prices from each exchange's API (select Tools -> Script Editor from within your spreadsheet):
var url = "http://bter.com/api/1/ticker/pts_btc/";
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var bter_ptsdata = JSON.parse(json);
function bter_pts() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Exchange Rates");
ss.getRange("B5").setValue(bter_ptsdata["last"])
}
The script above populates cell B5 in the spreadsheet tab "Exchange Rates" with the PTS to USD exchange rate data from Bter. Now, in order to keep this exchange rate up to date you need to setup a Trigger (in the Script Editor this is under Resources -> Current Project's Triggers). The trigger will run your script at a set increment to keep your exchange rate up to date.
I keep the "Exchange Rates" sheet separate of my balance sheet to keep things clean.
-
If you use Google Spreadsheets, you can use this general script to import prices from each exchange's API (select Tools -> Script Editor from within your spreadsheet):
var url = "http://bter.com/api/1/ticker/pts_btc/";
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var bter_ptsdata = JSON.parse(json);
function bter_pts() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Exchange Rates");
ss.getRange("B5").setValue(bter_ptsdata["last"])
}
The script above populates cell B5 in the spreadsheet tab "Exchange Rates" with the PTS to USD exchange rate data from Bter. Now, in order to keep this exchange rate up to date you need to setup a Trigger (in the Script Editor this is under Resources -> Current Project's Triggers). The trigger will run your script at a set increment to keep your exchange rate up to date.
I keep the "Exchange Rates" sheet separate of my balance sheet to keep things clean.
That is interesting, I'll have to give that a go. What about excel? Do you know of anyone who is using excel? It's what I would prefer to use. I'd rather have it on my computer than in the cloud...