From f27f71b33cb196cf8d606af61c2bfd7aec35304e Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Sat, 13 Jan 2018 12:04:01 +0100 Subject: [PATCH] extend dashboard trades overview with trade slippage (#1121) * extend dashboard trades overview with trade slippage * Update dashboard.ejs --- templates/dashboard.ejs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/dashboard.ejs b/templates/dashboard.ejs index 858f471946..17cd5c5b19 100644 --- a/templates/dashboard.ejs +++ b/templates/dashboard.ejs @@ -185,6 +185,7 @@ TYPE AMOUNT PRICE + SLIPPAGE DATE EXECUTED DATE @@ -195,6 +196,7 @@ BUY <%= buy_order.size %> <%= asset.toUpperCase() %> <%= buy_order.price %> <%= currency.toUpperCase() %> + <%= new Date(buy_order.time).toLocaleString("en-US", { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }) %> Waiting @@ -204,6 +206,7 @@ SELL <%= sell_order.size %> <%= asset.toUpperCase() %> <%= sell_order.price %> <%= currency.toUpperCase() %> + <%= new Date(sell_order.time).toLocaleString("en-US", { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }) %> Waiting @@ -214,6 +217,7 @@ <%= trade.type.toUpperCase() %> <%= trade.size %> <%= asset.toUpperCase() %> <%= trade.price %> <%= currency.toUpperCase() %> + <%= new Intl.NumberFormat("en-US", {style: "percent", maximumSignificantDigits: 4}).format(trade.slippage) %> <%= new Date(trade.time).toLocaleString("en-US", { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }) %> <%= new Date(trade.time + trade.execution_time).toLocaleString("en-US", { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }) %> @@ -221,7 +225,7 @@ <% } %> <% if (!(typeof buy_order != "undefined" || typeof sell_order != "undefined") && !my_trades) { %> - There is no trades at the moment + There is no trades at the moment <% } %>