Cryptocurrency Portfolio Spreadsheet Help

Started by Chartist, March 10, 2014, 08:29:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chartist

Quote from: wasthatawolf on March 12, 2014, 04:13:05 PM
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...
@BTC_Analyst
PTS - PfBmz147Mt6aU3tZ38PyFLMT8P1oxy8NVz
MMC - MRxPyEDRbQFcEpeTdv2B6oXUKWTxeFqWsq

wasthatawolf

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.

Chartist

@BTC_Analyst
PTS - PfBmz147Mt6aU3tZ38PyFLMT8P1oxy8NVz
MMC - MRxPyEDRbQFcEpeTdv2B6oXUKWTxeFqWsq

xeroc


Chartist

Quote from: lakerta06 on March 10, 2014, 08:36:03 AM
http://data.bter.com/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?
@BTC_Analyst
PTS - PfBmz147Mt6aU3tZ38PyFLMT8P1oxy8NVz
MMC - MRxPyEDRbQFcEpeTdv2B6oXUKWTxeFqWsq


Chartist

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.
@BTC_Analyst
PTS - PfBmz147Mt6aU3tZ38PyFLMT8P1oxy8NVz
MMC - MRxPyEDRbQFcEpeTdv2B6oXUKWTxeFqWsq