protected override UpdaterResult fetchUpdateResult() { UpdaterResult r = new UpdaterResult(); Balance b; try { b = _link.GetBalance(); } catch (Exception e) { r.LongVals.Add(-1); return r; } r.LongVals.Add(b.TotalBalance[_currency]); return r; }
protected override UpdaterResult fetchUpdateResult() { if (_link.GetType() == typeof(StampLink)) { UpdaterResult r = new UpdaterResult(); ExchangeRate e = ((StampLink)_link).GetEurUsdRate(); r.DoubleVals.Add(e.Buy); r.DoubleVals.Add(e.Sell); return r; } else { return null; } }
private void UpdateSellFee(UpdaterResult result) { double fee = result.DoubleVals[0]; if (fee != _sellFee) { Log("Kraken fee changed to " + fee.ToString() + "%", 0); _sellFee = fee; } }
private void UpdateSellBalance(UpdaterResult result) { long balance = result.LongVals[0]; if (balance == -1) { Log("ERROR", 1); _sellBalance = 0; } else { Log(ExchangeUtils.SatoshiToString(balance) + " XBT", 1); _sellBalance = balance; } }
private void UpdateExchangeRate(UpdaterResult result) { _exchangeRate.Buy = result.DoubleVals[0]; _exchangeRate.Sell = result.DoubleVals[1]; Log("EUR/USD rates: (Buy) " + _exchangeRate.Buy.ToString() + " - (Sell) " + _exchangeRate.Sell.ToString(), 0); }
private void UpdateBuyFee(UpdaterResult result) { double fee = result.DoubleVals[0]; if (fee != _buyFee) { Log("Bitstamp fee changed to " + fee.ToString() + "%", 0); _buyFee = fee; } }
private void UpdateBuyBalance(UpdaterResult result) { long balance = result.LongVals[0]; Log(ExchangeUtils.SatoshiToString(balance) + " USD", 2); _buyBalance = balance; }