Пример #1
0
        public void Connect(string szPath, string szAddresses,
            string szBrokerId, string szInvestorId, string szPassword,
            THOST_TE_RESUME_TYPE nResumeType,
            string szUserProductInfo, string szAuthCode)
        {
            m_Api.Connection = new ConnectionInfo()
            {
                TempPath = szPath,
            };

            m_Api.Front = new FrontInfo()
            {
                BrokerId = szBrokerId,
                TradeAddress = szAddresses,
                UserProductInfo = szUserProductInfo,
                AuthCode = szAuthCode,
            };

            m_Api.Account = new AccountInfo()
            {
                InvestorId = szInvestorId,
                Password = szPassword,
            };

            m_Api.ResumeType = nResumeType;

            Disconnect_TD();
            Connect_TD();
        }
Пример #2
0
        public void Connect(ServerItem server, AccountItem account,THOST_TE_RESUME_TYPE resumeType)
        {
            tempPath = System.IO.Path.GetTempPath() + Path.DirectorySeparatorChar + server.BrokerID + Path.DirectorySeparatorChar + account.InvestorId;
            Directory.CreateDirectory(tempPath);
            ResumeType = resumeType;

            Disconnect_TD();

            Connect_MsgQueue();
            Connect_TD();
        }
Пример #3
0
        public void Connect(ServerItem server, AccountItem account,THOST_TE_RESUME_TYPE resumeType)
        {
            tempPath = Framework.Installation.TempDir.FullName + Path.DirectorySeparatorChar + server.BrokerID + Path.DirectorySeparatorChar + account.InvestorId;
            Directory.CreateDirectory(tempPath);
            ResumeType = resumeType;

            Disconnect_TD();

            Connect_MsgQueue();
            Connect_TD();
        }
Пример #4
0
        public void Connect(string szPath, string szAddresses,
                            string szBrokerId, string szInvestorId, string szPassword,
                            THOST_TE_RESUME_TYPE nResumeType,
                            string szUserProductInfo, string szAuthCode)
        {
            this.szPath            = szPath;
            this.szAddresses       = szAddresses;
            this.szBrokerId        = szBrokerId;
            this.szInvestorId      = szInvestorId;
            this.szPassword        = szPassword;
            this.nResumeType       = nResumeType;
            this.szUserProductInfo = szUserProductInfo;
            this.szAuthCode        = szAuthCode;

            Disconnect_TD();
            Connect_MsgQueue();
            Connect_TD();
        }
Пример #5
0
 public static extern void TD_Connect(IntPtr pTraderApi,
     string szPath, string szAddresses,
     string szBrokerId, string szInvestorId, string szPassword,
     THOST_TE_RESUME_TYPE nResumeType,
     string szUserProductInfo, string szAuthCode);
Пример #6
0
 public static extern void TD_Connect(IntPtr pTraderApi,
                                      string szPath, string szAddresses,
                                      string szBrokerId, string szInvestorId, string szPassword,
                                      THOST_TE_RESUME_TYPE nResumeType,
                                      string szUserProductInfo, string szAuthCode);
Пример #7
0
        public void Connect(string szPath, string szAddresses,
            string szBrokerId, string szInvestorId, string szPassword,
            THOST_TE_RESUME_TYPE nResumeType,
            string szUserProductInfo, string szAuthCode)
        {
            this.szPath = szPath;
            this.szAddresses = szAddresses;
            this.szBrokerId = szBrokerId;
            this.szInvestorId = szInvestorId;
            this.szPassword = szPassword;
            this.nResumeType = nResumeType;
            this.szUserProductInfo = szUserProductInfo;
            this.szAuthCode = szAuthCode;

            Disconnect_TD();
            Connect_MsgQueue();
            Connect_TD();
        }
Пример #8
0
 public virtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType)
 {
     thosttradeapiPINVOKE.CThostFtdcTraderApi_SubscribePublicTopic(swigCPtr, (int)nResumeType);
 }
Пример #9
0
 public void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType)
 {
     _traderApi.SubscribePublicTopic(nResumeType);
 }