Exemple #1
0
        public void RegisterEvents(DeribitClient client, PositionManager positionManager)
        {
            this.positionManager = positionManager;
            this.positionManager.BalanceChangeMessage += BalanceChangeMessage;
            PositionGrid.ItemsSource = this.positionManager.GetPositions();

            this.client = client;
            this.client.ClientSubscriptionMessage += ClientSubscriptionMessage;
        }
        public MainWindow()
        {
            Client      = new DeribitClient();
            PositionMan = new PositionManager();
            HistoryMan  = new HistoryManager();
            InitializeComponent();

            connectionStatus.RegisterEvents(Client);
            orderControl.RegisterEvents(Client, PositionMan);
            positionControl.RegisterEvents(Client, PositionMan);
            historyControl.RegisterEvents(PositionMan, HistoryMan);
        }
 public void RegisterEvents(DeribitClient client)
 {
     this.client             = client;
     client.ClientConnected += ClientConnected;
 }
 public void RegisterEvents(DeribitClient client, PositionManager positionManager)
 {
     this.positionManager = positionManager;
     this.client          = client;
     this.client.GetInstrumentsResponseMessage += GetInstrumentsResponseMessage;
 }