Beispiel #1
0
        void SendUnsubscribeForTradingEventsRequest(OpenApiMessagesFactory msgFactory, Queue writeQueue)
        {
            var _msg = msgFactory.CreateUnsubscribeForTradingEventsRequest(AccountId);

            if (isDebugIsOn)
            {
                Console.WriteLine("SendUnsubscribeForTradingEventsRequest() Message to be sent:\n{0}", OpenApiMessagesPresentation.ToString(_msg));
            }
            writeQueue.Enqueue(_msg.ToByteArray());
        }
        private void SendUnsubscribeForTradingEventsRequest(long testAccountId)
        {
            var _msg = outgoingMsgFactory.CreateUnsubscribeForTradingEventsRequest(testAccountId);

            if (isDebugIsOn)
            {
                Console.WriteLine("SendUnsubscribeForTradingEventsRequest() Message to be send:\n{0}", OpenApiMessagesPresentation.ToString(_msg));
            }
            writeQueue.Enqueue(Utils.Serialize(_msg));
        }
Beispiel #3
0
        protected void btnUnsubscribeForTradingEvents_Click(object sender, EventArgs e)
        {
            SendAuthorizationRequest();
            var accountID  = ddlTradingAccounts.SelectedValue;
            var msgFactory = new OpenApiMessagesFactory();
            var msg        = msgFactory.CreateUnsubscribeForTradingEventsRequest(Convert.ToInt32(accountID));

            Transmit(msg);
            byte[] _message     = Listen(_apiSocket);
            var    protoMessage = msgFactory.GetMessage(_message);

            lblResponse.Text = OpenApiMessagesPresentation.ToString(protoMessage);
        }