Beispiel #1
0
        public void UpdateCurrency(string baseSymbol, string termSymbol)
        {
            TraderSubscriber.OrderBookUnsubscribe(OrderBookDestination + Symbol, OnBestBidAsk);
            BaseSymbol = baseSymbol;
            TermSymbol = termSymbol;
            Symbol     = baseSymbol + termSymbol;
            Security   = ConfiguratorService.GetSecurities().FirstOrDefault(s => s.BaseCurrency == baseSymbol && s.TermCurrency == termSymbol);

            BestBid = 0;
            BestAsk = 0;
            TraderSubscriber.OrderBookSubcribe(OrderBookDestination + Symbol, OnBestBidAsk);
        }
Beispiel #2
0
 public void CloseConnections()
 {
     TraderSubscriber.OrderBookUnsubscribe(OrderBookDestination + Symbol, OnBestBidAsk);
     TraderSubscriber.OrdersUnsubscribe(CheckOrderStatus);
     TraderSubscriber.StopResponses();
     ManagerSubscriber.StopResponses();
     TraderSubscriber.Close();
     ManagerSubscriber.Close();
     if (TestTrader != null)
     {
         TestTrader.Finish();
     }
 }