From aa08050fccf286d8aca0296e6a8f94c527a162eb Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Wed, 16 Oct 2019 10:05:19 +0900 Subject: [PATCH] Exchange fees --- Monitor/Pages/_get/DashboardTop.cshtml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index e41e687..eca954f 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -149,7 +149,18 @@ // Aggregate totals Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost; - double TradingFee = (dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) * 0.002; + + if (Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Binance")) { + double ExchangeFee = 0.002; + } + if (Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Bittrex")) { + double ExchangeFee = 0.0025; + } + if (Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Poloniex")) { + double ExchangeFee = 0.0025; + } + + double TradingFee = (dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) * ExchangeFee; Model.TotalBagValue = Model.TotalBagValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) - TradingFee); // Render the row