コード例 #1
0
ファイル: TickerApi.cs プロジェクト: EurekaChen/CoinTrade
        public void UpdateTicker(ref Ticker ticker)
        {
            Quotation quotation = new Quotation();

            quotation.Ticker = ticker;
            IQuotationApi quotationUpdater = apiManager.GetApi <IQuotationApi>(Exchange.AbbrName);

            quotationUpdater.UpdateQuotation(ref quotation);
        }
コード例 #2
0
        //BTC38现只提供一个API,通过Qutaion进行更新
        public void UpdateHistory(ref History history)
        {
            Quotation quotation = new Quotation();

            quotation.History = history;
            quotation.Ticker  = history.Ticker;
            IQuotationApi quotationUpdater = apiManager.GetApi <IQuotationApi>(Exchange.AbbrName);

            quotationUpdater.UpdateQuotation(ref quotation);
        }
コード例 #3
0
        private void RefreshTicker(Ticker ticker)
        {
            quotaionViewModel.Quotation         = new Quotation();
            quotaionViewModel.Quotation.Ticker  = ticker;
            quotaionViewModel.Quotation.History = new History(ticker);
            var           refQuotation     = quotaionViewModel.Quotation;
            IQuotationApi quotationUpdater = apiManager.GetApi <IQuotationApi>(ticker.Exchange.AbbrName);

            quotationUpdater.UpdateQuotation(ref refQuotation);
        }
コード例 #4
0
        private void Refresh(Ticker ticker)
        {
            IQuotationApi quotationUpdater = apiManager.GetApi <IQuotationApi>(Exchange.AbbrName);

            CurrentTicker            = ticker;
            IsTradeVisible           = true;
            CurrentQuotation.Ticker  = ticker;
            CurrentQuotation.History = new History(ticker);

            var refQuotation = CurrentQuotation;

            quotationUpdater.UpdateQuotation(ref refQuotation);

            BuyAmount  = 0;
            SellAmount = 0;
            BuyPrice   = 0;
            SellPrice  = 0;

            OnPropertyChanged("SellFeePercentage");
            OnPropertyChanged("BuyFeePercentage");

            UpdateOpenOrders(ticker);
        }