コード例 #1
0
        public EntityResponse <List <HistoricalFundTransfer> > GetHistoricalTransferFund(string customerAccountCode, string BeginDate, string EndDate, int qryPos, int qryNum)
        {
            var arguments = new List <SZKingdomArgument>();

            arguments.Add(SZKingdomArgument.CustomerAccountCode(customerAccountCode));
            arguments.Add(SZKingdomArgument.BeginDate(BeginDate));
            arguments.Add(SZKingdomArgument.EndDate(EndDate));
            arguments.Add(SZKingdomArgument.QueryNumer(qryNum));
            arguments.Add(SZKingdomArgument.QueryPosition(qryPos));


            EntityResponse <List <HistoricalFundTransfer> > results = _marketDataLibrary.ExecuteCommandList <HistoricalFundTransfer>(SZKingdomRequest.HistoricalFundTransfer, arguments);

            if (results.IsSuccess)
            {
                if (results.Entity.Count >= 1)
                {
                    List <HistoricalFundTransfer> resultList = (List <HistoricalFundTransfer>)results.Entity.OrderBy(u => u.OccurTime); // order by OccurTime to show

                    return(resultList);
                }
                return(EntityResponse <List <HistoricalFundTransfer> > .Error(ErrorCode.AuthenticationIncorrectIdentity, string.Format(ErrorMessages.InvalidDateRange, BeginDate, EndDate)));
            }
            return(EntityResponse <List <HistoricalFundTransfer> > .Error(results));
        }
コード例 #2
0
        public EntityResponse <List <AssignableExerciseDetail> > AssignableExerciseDetail(AssignableExerciseDetailArguments assignableExerciseDetailArguments)
        {
            List <SZKingdomArgument> arguments = new List <SZKingdomArgument>();

            arguments.Add(SZKingdomArgument.CustomerCode(assignableExerciseDetailArguments.CustomerCode));
            arguments.Add(SZKingdomArgument.CustomerAccountCode(assignableExerciseDetailArguments.CustomerAccountCode));
            arguments.Add(SZKingdomArgument.Currency(assignableExerciseDetailArguments.Currency));
            arguments.Add(SZKingdomArgument.StockBoard(assignableExerciseDetailArguments.StockBoard));

            arguments.Add(SZKingdomArgument.TradeAccount(assignableExerciseDetailArguments.TradeAccount));
            arguments.Add(SZKingdomArgument.OptionNumber(assignableExerciseDetailArguments.OptionNumber));
            arguments.Add(SZKingdomArgument.OptionUnderlyingCode(assignableExerciseDetailArguments.OptionUnderlyingCode));
            arguments.Add(SZKingdomArgument.OptionType(assignableExerciseDetailArguments.OptionType));
            arguments.Add(SZKingdomArgument.OptionCoveredFlag(assignableExerciseDetailArguments.OptionCoveredFlag));
            arguments.Add(SZKingdomArgument.ExerciseSide(assignableExerciseDetailArguments.ExerciseSide));
            arguments.Add(SZKingdomArgument.QueryPosition(assignableExerciseDetailArguments.QueryPosition));
            arguments.Add(SZKingdomArgument.QueryNumer(assignableExerciseDetailArguments.QueryNumer));



            //if (orderArguments.SecurityLevel != SecurityLevel.NoSecurity)
            //{
            //    if (!string.IsNullOrWhiteSpace(orderArguments.SecurityInfo))
            //    {
            //        arguments.Add(SZKingdomArgument.SecurityInfo(orderArguments.SecurityInfo));
            //    }
            //    else if (!string.IsNullOrWhiteSpace(orderArguments.Password))
            //    {
            //        orderArguments.SecurityInfo = _marketDataLibrary.EncryptPassword(orderArguments.CustomerAccountCode, orderArguments.Password);
            //    }
            //    else
            //    {
            //        EntityResponse<OptionOrderInformation> entityResponse = EntityResponse<OptionOrderInformation>
            //            .Error(ErrorCode.SZKingdomLibraryError, "No security info");
            //        return entityResponse;
            //    }
            //}

            EntityResponse <List <AssignableExerciseDetail> > result =
                _marketDataLibrary.ExecuteCommandList <AssignableExerciseDetail>(SZKingdomRequest.AssignableExerciseDetail, arguments);

            return(result);
        }