public ApiResult Login()
        {
            var success = new ApiResult { Result = true };

            if (LoginAccounts.ContainsKey(Account.MainID))
            {
                return success;
            }

            TdxTrade1Api.OpenTdx();
            var error = new StringBuilder(ErrorCapacity);

            var clientId = TdxTrade1Api.Logon(Host.IPAddress, (short)Host.Port,
                Account.TradeApiVersion, Account.YingYeBuDM,
                Account.MainID, Account.MainID, Account.TradePassword, Account.MessagePassword, error);
            if (clientId > -1)
            {
                LoginAccounts.GetOrAdd(Account.MainID, clientId);
            }
            return new ApiResult
            {
                Result = clientId == -1,
                Error = error.ToString()
            };
        }
        public ApiResult Login()
        {
            var success = new ApiResult { Result = true };

            if (LoginAccounts.Any(str => Account.MainID == str))
            {
                return success;
            }

            TdxTradeApi.SetServer(Host.IPAddress, Host.Port);
            TdxTradeApi.SetAccount(Account.MainID, Account.TradePassword, Account.MessagePassword);

            if (TdxTradeApi.Login())
            {
                LoginAccounts.Add(Account.MainID);
                return success;
            }
            else
            {
                var serverInfo = TdxTradeApi.GetReturnInfo();
                return new ApiResult
                {
                    Result = false,
                    Error = serverInfo
                };
            }
        }