Example #1
0
        void SendAmendLimitOrderRequest(OpenApiMessagesFactory msgFactory, Queue writeQueue)
        {
            var _msg = msgFactory.CreateAmendLimitOrderRequest(AccountId, AccessToken, orderId, 1.10, clientMsgId);

            if (isDebugIsOn)
            {
                Console.WriteLine("SendLimitOrderRequest() Message to be sent:\n{0}", OpenApiMessagesPresentation.ToString(_msg));
            }
            writeQueue.Enqueue(_msg.ToByteArray());
        }
Example #2
0
        protected void btnSendAmendLimitOrderRequest_Click(object sender, EventArgs e)
        {
            SendAuthorizationRequest();
            var accountID  = ddlTradingAccounts.SelectedValue;
            var token      = Session["Token"].ToString();
            var msgFactory = new OpenApiMessagesFactory();
            var msg        = msgFactory.CreateAmendLimitOrderRequest(Convert.ToInt32(accountID), token, 100000, 1.10);

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

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