From bcb3be2bb1803f38669440a609411e8f2980f011 Mon Sep 17 00:00:00 2001 From: Eric Carmichael Date: Fri, 31 Mar 2017 12:50:01 -0700 Subject: [PATCH 01/26] Increase page update interval --- www/lendingbot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/lendingbot.js b/www/lendingbot.js index cfe6807c..94b5160f 100644 --- a/www/lendingbot.js +++ b/www/lendingbot.js @@ -214,18 +214,18 @@ function handleLocalFile(file) { function loadData() { if (localFile) { reader.readAsText(localFile, 'utf-8'); - setTimeout('loadData()',30000) + setTimeout('loadData()', 10000) } else { // expect the botlog.json to be in the same folder on the webserver var file = 'botlog.json'; $.getJSON(file, function (data) { updateJson(data); // reload every 30sec - setTimeout('loadData()',30000) + setTimeout('loadData()', 10000) }).fail( function(d, textStatus, error) { $('#status').text("getJSON failed, status: " + textStatus + ", error: "+error); // retry after 60sec - setTimeout('loadData()',60000) + setTimeout('loadData()', 60000) });; } } From de08e92b65cf6331158c43142d330197fd96b2bc Mon Sep 17 00:00:00 2001 From: Eric Carmichael Date: Fri, 31 Mar 2017 15:07:09 -0700 Subject: [PATCH 02/26] show yearly earnings as well --- www/lendingbot.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/www/lendingbot.js b/www/lendingbot.js index 94b5160f..bdb002ba 100644 --- a/www/lendingbot.js +++ b/www/lendingbot.js @@ -2,11 +2,12 @@ var localFile, reader; -var Hour = new Timespan("Hour",1/24); -var Day = new Timespan("Day",1); -var Week = new Timespan("Week",7); -var Month = new Timespan("Month",30); -var timespans = [Month, Week, Day, Hour]; +var Hour = new Timespan("Hour", 1/24); +var Day = new Timespan("Day", 1); +var Week = new Timespan("Week", 7); +var Month = new Timespan("Month", 30); +var Year = new Timespan("Year", 365); +var timespans = [Year, Month, Week, Day, Hour]; var summaryCoinRate, summaryCoin; var earningsOutputCoinRate, earningsOutputCoin; var outputCurrencyDisplayMode = 'all' From 1a58be04f2f18ae5eff09a3d9365a89133ba6549 Mon Sep 17 00:00:00 2001 From: Eric Carmichael Date: Fri, 31 Mar 2017 15:15:19 -0700 Subject: [PATCH 03/26] Display USD with 2 decimal places --- www/lendingbot.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/lendingbot.js b/www/lendingbot.js index bdb002ba..92396342 100644 --- a/www/lendingbot.js +++ b/www/lendingbot.js @@ -247,6 +247,8 @@ function Timespan(name, multiplier) { } if (currency == "BTC") { return displayUnit.formatValue(earnings) + " " + displayUnit.name + " / " + name + "
" + } else if (currency == "USD" || currency == "USDT") { + return printFloat(earnings, 2) + " " + currency + " / "+ name + "
"; } else { return printFloat(earnings, 8) + " " + currency + " / "+ name + "
"; } From 45bc4396cb41aec84bb2a761cef023b63f1f3823 Mon Sep 17 00:00:00 2001 From: Eric Carmichael Date: Sat, 1 Apr 2017 18:45:23 -0700 Subject: [PATCH 04/26] display total holdings --- www/lendingbot.html | 6 +++--- www/lendingbot.js | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/www/lendingbot.html b/www/lendingbot.html index 5b6abbb4..90beb3d9 100644 --- a/www/lendingbot.html +++ b/www/lendingbot.html @@ -26,15 +26,15 @@ - + - + - + @@ -65,20 +67,34 @@ -
+
@@ -117,12 +133,12 @@ @@ -131,7 +133,8 @@

Poloniex Lending Bot