public EntityResponse <List <BankCodeInformation> > GetBankCodeInformation(string customerAccountCode, Currency currency) { var arguments = new List <SZKingdomArgument>(); arguments.Add(SZKingdomArgument.CustomerAccountCode(customerAccountCode)); arguments.Add(SZKingdomArgument.Currency(currency)); return(_marketDataLibrary.ExecuteCommandList <BankCodeInformation>(SZKingdomRequest.GetBankCode, arguments)); }
public EntityResponse <OrderMarginInformation> GetOptionOrderMargin(OrderMarginArguments orderArguments) { List <SZKingdomArgument> arguments = new List <SZKingdomArgument>(); arguments.Add(SZKingdomArgument.CustomerAccountCode(orderArguments.CustomerAccountCode)); arguments.Add(SZKingdomArgument.StockBoard(orderArguments.StockBoard)); arguments.Add(SZKingdomArgument.Currency(orderArguments.Currency)); arguments.Add(SZKingdomArgument.TradeAccount(orderArguments.TradeAccount)); arguments.Add(SZKingdomArgument.OptionNumber(orderArguments.OptionNumber)); arguments.Add(SZKingdomArgument.OrderQuantity(orderArguments.OrderQuantity)); EntityResponse <OrderMarginInformation> result = _marketDataLibrary.ExecuteCommandSingleEntity <OrderMarginInformation>(SZKingdomRequest.OptionOrderMargin, arguments); return(result); }
public EntityResponse <FundTransferSerialNo> TransferFund(TransferFundArguments transferArguments) { var arguments = new List <SZKingdomArgument>(); arguments.Add(SZKingdomArgument.CustomerAccountCode(transferArguments.CustomerAccountCode)); arguments.Add(SZKingdomArgument.Currency(transferArguments.Currency)); arguments.Add(SZKingdomArgument.FundPassword(_marketDataLibrary.EncryptPassword(transferArguments.CustomerAccountCode, transferArguments.FundPassword))); arguments.Add(SZKingdomArgument.BankCode(transferArguments.BankCode)); arguments.Add(SZKingdomArgument.BankPassword(_marketDataLibrary.EncryptPassword(transferArguments.CustomerAccountCode, transferArguments.BankPassword))); arguments.Add(SZKingdomArgument.TransferType(transferArguments.TransferType)); arguments.Add(SZKingdomArgument.TransferAmount(transferArguments.TransferAmount)); arguments.Add(SZKingdomArgument.EncryptionKey(transferArguments.CustomerAccountCode)); arguments.Add(SZKingdomArgument.EncryptionType(EncryptionType.WinEncryption)); arguments.Add(SZKingdomArgument.OperationRemark(transferArguments.OperationRemark)); return(_marketDataLibrary.ExecuteCommandSingleEntity <FundTransferSerialNo>(SZKingdomRequest.FundTransfer, arguments)); }
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); }
public EntityResponse <RiskLevelInformation> GetAccountRiskLevelInformation(string customerAccountCode, Currency currency) { List <SZKingdomArgument> arguments = new List <SZKingdomArgument>(); if (string.IsNullOrWhiteSpace(customerAccountCode)) { return(EntityResponse <RiskLevelInformation> .Error( ErrorCode.SZKingdomLibraryError, ErrorMessages.SZKingdom_CustomerCodeEmpty)); } arguments.Add(SZKingdomArgument.CustomerAccountCode(customerAccountCode)); arguments.Add(SZKingdomArgument.Currency(currency)); EntityResponse <RiskLevelInformation> result = _marketDataLibrary.ExecuteCommandSingleEntity <RiskLevelInformation>(SZKingdomRequest.AccountRiskLevel, arguments); return(result); }
public EntityResponse <List <FundInformation> > GetFundInformation(string customertCode = null, string customerAccountCode = null, Currency currency = null) { List <SZKingdomArgument> arguments = new List <SZKingdomArgument>(); if (string.IsNullOrWhiteSpace(customertCode) && string.IsNullOrWhiteSpace(customerAccountCode)) { return(EntityResponse <List <FundInformation> > .Error(ErrorCode.SZKingdomLibraryError, string.Format(ErrorMessages.SZKingdom_EmptyAccountIds))); } arguments.Add(SZKingdomArgument.CustomerCode(customertCode)); arguments.Add(SZKingdomArgument.CustomerAccountCode(customerAccountCode)); arguments.Add(SZKingdomArgument.Currency(currency)); arguments.Add(SZKingdomArgument.ValueFlag("15")); EntityResponse <List <FundInformation> > result = _marketDataLibrary.ExecuteCommandList <FundInformation>(SZKingdomRequest.FundInformation, arguments); return(result); }