public int InitTradeAPI()
        {
            TapAPIApplicationInfo appInfo = new TapAPIApplicationInfo();

            appInfo.AuthCode = Config.Cert.AuthCode;
            int iResult = 0;

            m_api = TapTrade.CreateTapTradeAPI(appInfo, out iResult);
            if (m_api != null)
            {
                m_api.SetAPINotify(TradeNotify);
            }
            return(iResult);
        }
Esempio n. 2
0
        public int InitTradeAPI()
        {
            TapAPIApplicationInfo appInfo = new TapAPIApplicationInfo();

            appInfo.KeyOperationLogPath = "LogEsTrade";
            appInfo.AuthCode            = "67EA896065459BECDFDB924B29CB7DF1946CED32E26C1EAC946CED32E26C1EAC946CED32E26C1EAC946CED32E26C1EAC5211AF9FEE541DDE41BCBAB68D525B0D111A0884D847D57163FF7F329FA574E7946CED32E26C1EAC946CED32E26C1EAC733827B0CE853869ABD9B8F170E14F8847D3EA0BF4E191F5D97B3DFE4CCB1F01842DD2B3EA2F4B20CAD19B8347719B7E20EA1FA7A3D1BFEFF22290F4B5C43E6C520ED5A40EC1D50ACDF342F46A92CCF87AEE6D73542C42EC17818349C7DEDAB0E4DB16977714F873D505029E27B3D57EB92D5BEDA0A710197EB67F94BB1892B30F58A3F211D9C3B3839BE2D73FD08DD776B9188654853DDA57675EBB7D6FBBFC";
            int iResult = -1;

            m_api = TapTradeWrapper.CreateITapTradeAPI(appInfo, out iResult);
            if (m_api != null)
            {
                try
                {
                    var t = m_api.SetAPINotify(TradeNotify);
                }catch (Exception ex)
                {
                }
            }
            return(iResult);
        }