Esempio n. 1
0
        public void UpdateTicker(ref Ticker ticker)
        {
            Quotation quotation = new Quotation();

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

            quotationUpdater.UpdateQuotation(ref quotation);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }