本文整理汇总了C#中StockSharp.InteractiveBrokers.Native.IBSocket.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# IBSocket.ReadInt方法的具体用法?C# IBSocket.ReadInt怎么用?C# IBSocket.ReadInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StockSharp.InteractiveBrokers.Native.IBSocket
的用法示例。
在下文中一共展示了IBSocket.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProcessResponse
private bool OnProcessResponse(IBSocket socket)
{
var str = socket.ReadStr(false);
if (str.IsEmpty())
{
socket.AddErrorLog(LocalizedStrings.Str2524);
return false;
}
var message = (ResponseMessages)str.To<int>();
socket.AddDebugLog("Msg: {0}", message);
if (message == ResponseMessages.Error)
return false;
var version = (ServerVersions)socket.ReadInt();
switch (message)
{
case ResponseMessages.CurrentTime:
{
// http://www.interactivebrokers.com/en/software/api/apiguide/java/currenttime.htm
var time = socket.ReadLongDateTime();
OnProcessTimeShift(TimeHelper.NowWithOffset - time);
break;
}
case ResponseMessages.ErrorMessage:
{
if (version < ServerVersions.V2)
{
OnProcessMarketDataError(socket.ReadStr());
}
else
{
var id = socket.ReadInt();
var code = socket.ReadInt();
var msg = socket.ReadStr();
socket.AddInfoLog(() => msg);
if (id == -1)
break;
switch ((NotifyCodes)code)
{
case NotifyCodes.OrderCancelled:
{
OnProcessOrderCancelled(id);
break;
}
case NotifyCodes.OrderCannotTransmit:
case NotifyCodes.OrderCannotTransmitId:
case NotifyCodes.OrderCannotTransmitIncomplete:
case NotifyCodes.OrderDuplicateId:
case NotifyCodes.OrderFilled:
case NotifyCodes.OrderNotMatchPrev:
case NotifyCodes.OrderPriceOutOfRange:
case NotifyCodes.OrderSubmitFailed:
case NotifyCodes.OrderVolumeTooSmall:
case NotifyCodes.Rejected:
{
OnProcessOrderError(id, msg);
break;
}
case NotifyCodes.SecurityNoDefinition:
OnProcessSecurityLookupNoFound(id);
break;
default:
OnProcessMarketDataError(LocalizedStrings.Str2525Params.Put(msg, id, code));
break;
}
}
break;
}
case ResponseMessages.VerifyMessageApi:
{
/*int version =*/
socket.ReadInt();
/*var apiData = */
socket.ReadStr();
//eWrapper().verifyMessageAPI(apiData);
break;
}
case ResponseMessages.VerifyCompleted:
{
/*int version =*/
socket.ReadInt();
var isSuccessfulStr = socket.ReadStr();
var isSuccessful = "true".CompareIgnoreCase(isSuccessfulStr);
/*var errorText = */
socket.ReadStr();
if (isSuccessful)
{
//.........这里部分代码省略.........
示例2: ReadAccountSummaryEnd
private void ReadAccountSummaryEnd(IBSocket socket)
{
var requestId = socket.ReadInt();
SendOutMessage(new PortfolioLookupResultMessage { OriginalTransactionId = requestId });
}
示例3: ReadPortfolioPosition
private void ReadPortfolioPosition(IBSocket socket, ServerVersions version)
{
var contractId = version >= ServerVersions.V6 ? socket.ReadInt() : -1;
var secName = socket.ReadStr();
var type = socket.ReadSecurityType();
var expiryDate = socket.ReadExpiry();
var strike = socket.ReadDecimal();
var optionType = socket.ReadOptionType();
var multiplier = version >= ServerVersions.V7 ? socket.ReadMultiplier() : null;
var boardCode = version >= ServerVersions.V7 ? socket.ReadBoardCode() : null;
var currency = socket.ReadCurrency();
var secCode = (version >= ServerVersions.V2) ? socket.ReadStr() : secName;
var secClass = (version >= ServerVersions.V8) ? socket.ReadStr() : null;
var position = socket.ReadDecimal();
var marketPrice = socket.ReadDecimal();
var marketValue = socket.ReadDecimal();
var averagePrice = 0m;
var unrealizedPnL = 0m;
var realizedPnL = 0m;
if (version >= ServerVersions.V3)
{
averagePrice = socket.ReadDecimal();
unrealizedPnL = socket.ReadDecimal();
realizedPnL = socket.ReadDecimal();
}
var portfolio = version >= ServerVersions.V4 ? socket.ReadStr() : null;
if (version == ServerVersions.V6 && socket.ServerVersion == ServerVersions.V39)
boardCode = socket.ReadBoardCode();
var secId = new SecurityId
{
SecurityCode = secCode,
BoardCode = GetBoardCode(boardCode),
InteractiveBrokers = contractId,
};
SendOutMessage(new SecurityMessage
{
SecurityId = secId,
Name = secName,
SecurityType = type,
ExpiryDate = expiryDate,
Strike = strike,
OptionType = optionType,
Currency = currency,
Multiplier = multiplier ?? 0,
Class = secClass
});
if (portfolio.IsEmpty())
return;
SendOutMessage(
this
.CreatePositionChangeMessage(portfolio, secId)
.Add(PositionChangeTypes.CurrentValue, position)
.Add(PositionChangeTypes.CurrentPrice, marketPrice)
.Add(PositionChangeTypes.AveragePrice, averagePrice)
.Add(PositionChangeTypes.UnrealizedPnL, unrealizedPnL)
.Add(PositionChangeTypes.RealizedPnL, realizedPnL));
// TODO
//pos.SetMarketValue(marketValue);
}
示例4: ReadMyTrade
private void ReadMyTrade(IBSocket socket, ServerVersions version)
{
/* requestId */
if (version >= ServerVersions.V7)
socket.ReadInt();
// http://www.interactivebrokers.com/en/software/api/apiguide/java/execution.htm
var transactionId = socket.ReadInt();
//Handle the 2^31-1 == 0 bug
if (transactionId == int.MaxValue)
transactionId = 0;
//Read Contract Fields
var contractId = version >= ServerVersions.V5 ? socket.ReadInt() : -1;
var secName = socket.ReadStr();
var type = socket.ReadSecurityType();
var expiryDate = socket.ReadExpiry();
var strike = socket.ReadDecimal();
var optionType = socket.ReadOptionType();
var multiplier = version >= ServerVersions.V9 ? socket.ReadMultiplier() : null;
var boardCode = socket.ReadBoardCode();
var currency = socket.ReadCurrency();
var secCode = socket.ReadLocalCode(secName);
var secClass = (version >= ServerVersions.V10) ? socket.ReadStr() : null;
var tradeId = socket.ReadStr();
var time = socket.ReadDateTime("yyyyMMdd HH:mm:ss");
var portfolio = socket.ReadStr();
/* exchange */
socket.ReadStr();
var side = socket.ReadTradeSide();
var volume = socket.ReadDecimal();
var price = socket.ReadDecimal();
var permId = version >= ServerVersions.V2 ? socket.ReadInt() : (int?)null;
var clientId = version >= ServerVersions.V3 ? socket.ReadInt() : (int?)null;
var liquidation = version >= ServerVersions.V4 ? socket.ReadInt() : (int?)null;
var cumulativeQuantity = version >= ServerVersions.V6 ? socket.ReadInt() : (int?)null;
var averagePrice = version >= ServerVersions.V6 ? socket.ReadDecimal() : (decimal?)null;
var orderRef = version >= ServerVersions.V8 ? socket.ReadStr() : null;
var evRule = version >= ServerVersions.V9 ? socket.ReadStr() : null;
var evMultiplier = version >= ServerVersions.V9 ? socket.ReadDecimal() : (decimal?)null;
var secId = new SecurityId
{
SecurityCode = secCode,
BoardCode = GetBoardCode(boardCode),
InteractiveBrokers = contractId,
};
SendOutMessage(new SecurityMessage
{
SecurityId = secId,
Name = secName,
SecurityType = type,
ExpiryDate = expiryDate,
Strike = strike,
OptionType = optionType,
Currency = currency,
Multiplier = multiplier ?? 0,
Class = secClass
});
// заявка была создана руками
if (transactionId == 0)
return;
_secIdByTradeIds[tradeId] = secId;
var execMsg = new ExecutionMessage
{
ExecutionType = ExecutionTypes.Transaction,
OriginalTransactionId = transactionId,
TradeStringId = tradeId,
OriginSide = side,
TradePrice = price,
TradeVolume = volume,
PortfolioName = portfolio,
ServerTime = time,
SecurityId = secId,
HasTradeInfo = true,
};
if (permId != null)
execMsg.SetPermId(permId.Value);
if (clientId != null)
execMsg.SetClientId(clientId.Value);
if (liquidation != null)
execMsg.SetLiquidation(liquidation.Value);
if (cumulativeQuantity != null)
execMsg.SetCumulativeQuantity(cumulativeQuantity.Value);
if (averagePrice != null)
execMsg.SetAveragePrice(averagePrice.Value);
//.........这里部分代码省略.........
示例5: ReadPosition
private void ReadPosition(IBSocket socket, ServerVersions version)
{
var account = socket.ReadStr();
var contractId = socket.ReadInt();
var secName = socket.ReadStr();
var type = socket.ReadSecurityType();
var expiryDate = socket.ReadExpiry();
var strike = socket.ReadDecimal();
var optionType = socket.ReadOptionType();
var multiplier = socket.ReadMultiplier();
var boardCode = socket.ReadBoardCode();
var currency = socket.ReadCurrency();
var secCode = socket.ReadLocalCode(secName);
var secClass = (version >= ServerVersions.V2) ? socket.ReadStr() : null;
var pos = socket.ReadDecimal();
var avgCost = 0m;
if (version >= ServerVersions.V3)
avgCost = socket.ReadDecimal();
var secId = new SecurityId
{
SecurityCode = secCode,
BoardCode = GetBoardCode(boardCode),
InteractiveBrokers = contractId,
};
SendOutMessage(new SecurityMessage
{
SecurityId = secId,
Name = secName,
SecurityType = type,
ExpiryDate = expiryDate,
Strike = strike,
OptionType = optionType,
Currency = currency,
Multiplier = multiplier ?? 0,
Class = secClass
});
SendOutMessage(this
.CreatePositionChangeMessage(account, secId)
.Add(PositionChangeTypes.CurrentValue, pos)
.Add(PositionChangeTypes.AveragePrice, avgCost));
}
示例6: ReadTickVolume
private void ReadTickVolume(IBSocket socket)
{
var requestId = socket.ReadInt();
var volumeType = (FieldTypes)socket.ReadInt();
var volume = socket.ReadInt();
ProcessTick(requestId, volumeType, 0, volume);
}
示例7: ReadTickGeneric
private void ReadTickGeneric(IBSocket socket)
{
var requestId = socket.ReadInt();
var field = (FieldTypes)socket.ReadInt();
var valueRenamed = socket.ReadDecimal();
ProcessTick(requestId, field, valueRenamed, null);
//tickGeneric(tickerId, (FieldTypes) tickType, valueRenamed);
}
示例8: ReadMarketDepth
private void ReadMarketDepth(IBSocket socket, ResponseMessages message)
{
var requestId = socket.ReadInt();
var secId = GetSecurityId(requestId);
/* position */
var pos = socket.ReadInt();
if (message == ResponseMessages.MarketDepthL2)
{
/* marketMaker */
secId.BoardCode = socket.ReadBoardCode();
}
var operation = socket.ReadInt();
var side = socket.ReadBool() ? Sides.Buy : Sides.Sell;
var price = socket.ReadDecimal();
var volume = socket.ReadInt();
var prevQuotes = _depths.SafeAdd(secId, key =>
Tuple.Create(new SortedDictionary<decimal, decimal>(new BackwardComparer<decimal>()), new SortedDictionary<decimal, decimal>()));
var quotes = side == Sides.Buy ? prevQuotes.Item1 : prevQuotes.Item2;
this.AddDebugLog("MD {0} {1} POS {2} PRICE {3} VOL {4}", secId, operation, pos, price, volume);
switch (operation)
{
case 0: // insert
{
if (!CollectionHelper.TryAdd(quotes, price, volume))
quotes[price] += volume;
break;
}
case 1: // update
{
if (quotes.Count > (pos + 1))
{
var sign = side == Sides.Buy ? 1 : -1;
if (quotes[pos + 1] * sign >= price * sign)
{
for (var i = quotes.Count - 1; i >= pos + 1; i--)
quotes.Remove(quotes[quotes.Keys.ElementAt(i)]);
}
}
if (quotes.Count > pos)
{
//if (quotes[quotes.Keys.ElementAt(pos)] == price)
// quotes[price] = volume;
//else
//{
// depth.Remove(quotes[pos]);
// depth.AddQuote(quote);
//}
quotes[price] = volume;
}
else
{
if (!CollectionHelper.TryAdd(quotes, price, volume))
quotes[price] += volume;
}
break;
}
case 2: // delete
{
if (quotes.Count > pos)
quotes.Remove(quotes.Keys.ElementAt(pos));
break;
}
}
SendOutMessage(new QuoteChangeMessage
{
SecurityId = secId,
Bids = prevQuotes.Item1.Select(p => new QuoteChange(Sides.Buy, p.Key, p.Value)).ToArray(),
Asks = prevQuotes.Item2.Select(p => new QuoteChange(Sides.Sell, p.Key, p.Value)).ToArray(),
ServerTime = this.CurrentTime.Convert(TimeZoneInfo.Utc),
});
}
示例9: ReadNewsBulletins
private void ReadNewsBulletins(IBSocket socket)
{
var newsId = socket.ReadInt();
var newsType = (ExchangeNewsTypes)socket.ReadInt();
var newsMessage = socket.ReadStr();
var originatingExch = socket.ReadBoardCode();
SendOutMessage(new NewsMessage
{
Id = newsId.To<string>(),
BoardCode = originatingExch,
Headline = newsMessage,
ExtensionInfo = new Dictionary<object, object> { { "Type", newsType } },
ServerTime = this.CurrentTime.Convert(TimeHelper.Est)
});
}
示例10: ReadSecurityInfo
private void ReadSecurityInfo(IBSocket socket, ServerVersions version)
{
var requestId = version >= ServerVersions.V3 ? socket.ReadInt() : -1;
var secName = socket.ReadStr();
var type = socket.ReadSecurityType();
var expiryDate = socket.ReadExpiry();
var strike = socket.ReadDecimal();
var optionType = socket.ReadOptionType();
var boardCode = socket.ReadBoardCode();
var currency = socket.ReadCurrency();
var secCode = version >= ServerVersions.V2 ? socket.ReadLocalCode(secName) : null;
var marketName = socket.ReadStr();
var secClass = socket.ReadStr();
var contractId = socket.ReadInt();
var priceStep = socket.ReadDecimal();
var multiplier = socket.ReadMultiplier();
var orderTypes = socket.ReadStr();
var validExchanges = socket.ReadStr();
var priceMagnifier = version >= ServerVersions.V2 ? socket.ReadInt() : (int?)null;
var underlyingSecurityNativeId = version >= ServerVersions.V4 ? socket.ReadInt() : (int?)null;
var name = version >= ServerVersions.V4 ? socket.ReadStr() : null;
var routingExchange = version >= ServerVersions.V4 ? socket.ReadBoardCode() : null;
var contractMonth = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var industry = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var category = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var subCategory = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var timeZoneId = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var tradingHours = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var liquidHours = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var evRule = version >= ServerVersions.V8 ? socket.ReadStr() : null;
var evMultiplier = version >= ServerVersions.V8 ? socket.ReadDecimal() : (decimal?)null;
var secId = new SecurityId
{
SecurityCode = secCode,
BoardCode = GetBoardCode(boardCode),
InteractiveBrokers = contractId,
};
if (version >= ServerVersions.V7)
socket.ReadSecurityId(secId);
var secMsg = new SecurityMessage
{
SecurityId = secId,
Name = secName,
SecurityType = type,
ExpiryDate = expiryDate,
Strike = strike,
OptionType = optionType,
Currency = currency,
Multiplier = multiplier ?? 0,
Class = secClass,
OriginalTransactionId = requestId,
PriceStep = priceStep,
};
secMsg.SetMarketName(marketName);
secMsg.SetOrderTypes(orderTypes);
secMsg.SetValidExchanges(validExchanges);
if (priceMagnifier != null)
secMsg.SetPriceMagnifier(priceMagnifier.Value);
if (!routingExchange.IsEmpty())
secMsg.SetRoutingBoard(routingExchange);
if (contractMonth != null)
secMsg.SetContractMonth(contractMonth);
if (industry != null)
secMsg.SetIndustry(industry);
if (category != null)
secMsg.SetCategory(category);
if (subCategory != null)
secMsg.SetSubCategory(subCategory);
if (timeZoneId != null)
secMsg.SetTimeZoneId(timeZoneId);
if (tradingHours != null)
secMsg.SetTradingHours(tradingHours);
if (liquidHours != null)
secMsg.SetLiquidHours(liquidHours);
if (evRule != null)
secMsg.SetEvRule(evRule);
if (evMultiplier != null)
secMsg.SetEvMultiplier(evMultiplier.Value);
// TODO
//if (underlyingSecurityNativeId != null)
// ProcessSecurityAction(null, SecurityIdGenerator.GenerateId(underlyingSecurityNativeId.Value.To<string>(), exchangeBoard), underSec => security.UnderlyingSecurityId = underSec.Id);
SendOutMessage(secMsg);
//.........这里部分代码省略.........
示例11: ReadBondInfo
private void ReadBondInfo(IBSocket socket, ServerVersions version)
{
var requestId = version >= ServerVersions.V3 ? socket.ReadInt() : -1;
var secCode = socket.ReadStr();
var type = socket.ReadSecurityType();
var cusip = socket.ReadStr();
var coupon = socket.ReadDecimal();
var maturity = socket.ReadStr();
var issueDate = socket.ReadStr();
var ratings = socket.ReadStr();
var bondType = socket.ReadStr();
var couponType = socket.ReadStr();
var convertible = socket.ReadBool();
var callable = socket.ReadBool();
var putable = socket.ReadBool();
var description = socket.ReadStr();
var boardCode = socket.ReadBoardCode();
var currency = socket.ReadCurrency();
var marketName = socket.ReadStr();
var secClass = socket.ReadStr();
var contractId = socket.ReadInt();
var priceStep = socket.ReadDecimal();
var orderTypes = socket.ReadStr();
var validExchanges = socket.ReadStr();
var nextOptionDate = version >= ServerVersions.V2 ? socket.ReadStr() : null;
var nextOptionType = version >= ServerVersions.V2 ? socket.ReadStr() : null;
var nextOptionPartial = version >= ServerVersions.V2 ? socket.ReadBool() : (bool?)null;
var notes = version >= ServerVersions.V2 ? socket.ReadStr() : null;
var name = version >= ServerVersions.V4 ? socket.ReadStr() : null;
var evRule = version >= ServerVersions.V6 ? socket.ReadStr() : null;
var evMultiplier = version >= ServerVersions.V6 ? socket.ReadDecimal() : (decimal?)null;
var secId = new SecurityId
{
SecurityCode = secCode,
BoardCode = GetBoardCode(boardCode),
InteractiveBrokers = contractId,
};
if (version >= ServerVersions.V5)
socket.ReadSecurityId(secId);
var secMsg = new SecurityMessage
{
SecurityId = secId,
//Name = secName,
SecurityType = type,
Currency = currency,
Class = secClass,
PriceStep = priceStep,
};
secMsg.SetMarketName(marketName);
secMsg.SetOrderTypes(orderTypes);
secMsg.SetValidExchanges(validExchanges);
// TODO
//s.SetBondCusip(cusip);
//s.SetCoupon(coupon);
//s.SetMaturity(maturity);
//s.SetIssueDate(issueDate);
//s.SetRatings(ratings);
//s.SetBondType(bondType);
//s.SetCouponType(couponType);
//s.SetConvertible(convertible);
//s.SetCallable(callable);
//s.SetPutable(putable);
//s.SetDescription(description);
//if (nextOptionDate != null)
// s.SetNextOptionDate(nextOptionDate);
//if (nextOptionType != null)
// s.SetNextOptionType(nextOptionType);
//if (nextOptionPartial != null)
// s.SetNextOptionPartial(nextOptionPartial.Value);
//if (notes != null)
// s.SetNotes(notes);
if (evRule != null)
secMsg.SetEvRule(evRule);
if (evMultiplier != null)
secMsg.SetEvMultiplier(evMultiplier.Value);
SendOutMessage(secMsg);
}
示例12: ReadScannerData
private void ReadScannerData(IBSocket socket, ServerVersions version)
{
var requestId = socket.ReadInt();
var count = socket.ReadInt();
var tmp = Enumerable
.Range(0, count)
.Select(s =>
{
var rank = socket.ReadInt();
var contractId = version >= ServerVersions.V3 ? socket.ReadInt() : -1;
var secName = socket.ReadStr();
var type = socket.ReadSecurityType();
var expiryDate = socket.ReadExpiry();
var strike = socket.ReadDecimal();
var optionType = socket.ReadOptionType();
var boardCode = socket.ReadBoardCode();
var currency = socket.ReadCurrency();
var secCode = socket.ReadLocalCode(secName);
var marketName = socket.ReadStr();
var secClass = socket.ReadStr();
var distance = socket.ReadStr();
var benchmark = socket.ReadStr();
var projection = socket.ReadStr();
var legs = version >= ServerVersions.V2 ? socket.ReadStr() : null;
return new
{
Rank = rank,
ContractId = contractId,
SecName = secName,
SecCode = secCode,
Type = type,
ExpiryDate = expiryDate,
Strike = strike,
OptionType = optionType,
BoardCode = boardCode,
Currency = currency,
MarketName = marketName,
SecClass = secClass,
Distance = distance,
Benchmark = benchmark,
Projection = projection,
Legs = legs,
};
})
.ToArray();
var results = tmp.Select(t =>
{
var secId = new SecurityId
{
SecurityCode = t.SecCode,
BoardCode = GetBoardCode(t.BoardCode),
InteractiveBrokers = t.ContractId,
};
SendOutMessage(new SecurityMessage
{
SecurityId = secId,
Name = t.SecName,
SecurityType = t.Type,
ExpiryDate = t.ExpiryDate,
Strike = t.Strike,
OptionType = t.OptionType,
Currency = t.Currency,
Class = t.SecClass
});
var result = new ScannerResult
{
Rank = t.Rank,
SecurityId = secId,
Distance = t.Distance,
Benchmark = t.Benchmark,
Projection = t.Projection,
Legs = t.Legs
};
return result;
}).ToArray();
SendOutMessage(new ScannerResultMessage
{
Results = results,
OriginalTransactionId = requestId,
});
}
示例13: ReadTickEfp
private void ReadTickEfp(IBSocket socket)
{
var requestId = socket.ReadInt();
var fieldType = (FieldTypes)socket.ReadInt();
var basisPoints = socket.ReadDecimal();
var formattedBasisPoints = socket.ReadStr();
var impliedFuturesPrice = socket.ReadDecimal();
var holdDays = socket.ReadInt();
var futureExpiry = socket.ReadStr();
var dividendImpact = socket.ReadDecimal();
var dividendsToExpiry = socket.ReadDecimal();
//tickEfp(requestId, fieldType, basisPoints, formattedBasisPoints, impliedFuturesPrice,
// holdDays, futureExpiry, dividendImpact, dividendsToExpiry);
var l1Msg = GetLevel1Message(requestId)
.TryAdd(Level1Fields.StepPrice, basisPoints)
.TryAdd(Level1Fields.Yield, dividendsToExpiry);
SendOutMessage(l1Msg);
}
示例14: ReadTickString
private void ReadTickString(IBSocket socket)
{
var requestId = socket.ReadInt();
var field = (FieldTypes)socket.ReadInt();
var valueRenamed = socket.ReadStr();
//GetLevel1Message(requestId);
//tickString(requestId, fieldType, valueRenamed);
}
示例15: ReadFinancialAdvice
private void ReadFinancialAdvice(IBSocket socket)
{
var type = socket.ReadInt();
var xml = socket.ReadStr();
SendOutMessage(new FinancialAdviseMessage
{
AdviseType = type,
Data = xml
});
}