Example #1
0
        private void m_btnConnect_Click(object sender, EventArgs e)
        {
            m_AccountSetting.Price_Password     = m_txtPrice_Password.Text;
            m_AccountSetting.Price_HostName     = m_txtPrice_Host.Text;
            m_AccountSetting.Price_Port         = int.Parse(m_txtPrice_Port.Text);
            m_AccountSetting.Price_SenderCompID = m_txtPrice_SenderCompID.Text;
            m_AccountSetting.Price_TargetCompID = m_txtPrice_TargetCompID.Text;

            m_AccountSetting.Trade_Password     = m_txtTrade_Password.Text;
            m_AccountSetting.Trade_HostName     = m_txtTrade_Host.Text;
            m_AccountSetting.Trade_Port         = int.Parse(m_txtTrade_Port.Text);
            m_AccountSetting.Trade_SenderCompID = m_txtTrade_SenderCompID.Text;
            m_AccountSetting.Trade_TargetCompID = m_txtTrade_TargetCompID.Text;

            SaveAccountSetting();

            OneZero_Price_FixApi_Connector.Instance().StartSession(
                m_AccountSetting.Price_HostName,
                m_AccountSetting.Price_Port,
                m_AccountSetting.Price_SenderCompID,
                m_AccountSetting.Price_TargetCompID,
                m_AccountSetting.Price_Password);

            OneZero_Trade_FixApi_Connector.Instance().StartSession(
                m_AccountSetting.Trade_HostName,
                m_AccountSetting.Trade_Port,
                m_AccountSetting.Trade_SenderCompID,
                m_AccountSetting.Trade_TargetCompID,
                m_AccountSetting.Trade_Password);
        }
Example #2
0
 public static OneZero_Trade_FixApi_Connector Instance()
 {
     if (m_staticFixApiManager == null)
     {
         m_staticFixApiManager = new OneZero_Trade_FixApi_Connector();
     }
     return(m_staticFixApiManager);
 }
Example #3
0
 private void m_btnPositionForRequest_Click(object sender, EventArgs e)
 {
     OneZero_Trade_FixApi_Connector.Instance().PositionsRequest();
 }
Example #4
0
 private void m_btnSendMarketOrder_Click(object sender, EventArgs e)
 {
     OneZero_Trade_FixApi_Connector.Instance().SendMarketOrder("USDJPY", 0.01, Side.BUY);
 }