Files
StockSharp/Fix.Core/Native/FixOrderCancelReplaceRequest.cs
mika@stocksharp.com c0435b60da Carry the order type on a FIX replace record
A replace states its order type the way a registration does: the record
holds an OrdType the converter fills from the order type and the condition,
and reads back into the order type, so the replace of a stop reads back as
the replace of a conditional order of the same flavour. A replace that
leaves the type unsaid has none on the record either.
2026-10-17 21:46:36 +03:00

70 lines
2.9 KiB
C#

namespace StockSharp.Fix.Native;
/// <summary>
/// Data from OrderCancelReplaceRequest FIX message.
/// </summary>
/// <param name="ClOrdId">Client order identifier for the replace request.</param>
/// <param name="OrigClOrdId">Original client order identifier.</param>
/// <param name="OrderId">Exchange order identifier.</param>
/// <param name="Account">Account identifier.</param>
/// <param name="Price">New order price.</param>
/// <param name="OrderQty">New order quantity.</param>
/// <param name="SecurityType">Security type.</param>
/// <param name="CfiCode">CFI code (Classification of Financial Instruments).</param>
/// <param name="Symbol">Security symbol.</param>
/// <param name="SecurityExchange">Security exchange code.</param>
/// <param name="CashMargin">Cash margin indicator.</param>
/// <param name="Slippage">Allowed slippage.</param>
/// <param name="IsManual">Whether order modification is manual.</param>
/// <param name="MinQty">Minimum execution quantity.</param>
/// <param name="PositionEffect">Position effect (O=Open, C=Close).</param>
/// <param name="PostOnly">Post-only flag (maker only).</param>
/// <param name="SecondaryOrderId">Secondary order identifier.</param>
/// <param name="StrategyId">Strategy identifier.</param>
/// <param name="OldPrice">Previous order price.</param>
/// <param name="OldVolume">Previous order volume.</param>
/// <param name="Leverage">Leverage multiplier.</param>
/// <param name="Parties">Party information (ClientCode, BrokerCode).</param>
/// <param name="Side">Order side (1=Buy, 2=Sell). Carried so a replace can change/keep the side.</param>
/// <param name="TimeInForce">Time in force. Carried so a replace preserves the order's lifetime policy.</param>
/// <param name="ExpiryDate">Expiry time for a GTD order (maps to TillDate).</param>
/// <param name="MaxFloor">Displayed (iceberg) quantity, maps to VisibleVolume; the concealed size must survive a replace.</param>
/// <param name="Text">Free-text comment (maps to Comment).</param>
/// <param name="Condition">Order condition (stop/algo). Carried so a conditional order keeps its condition on replace.</param>
public record struct FixOrderCancelReplaceRequest(
FixId ClOrdId,
FixId OrigClOrdId,
string OrderId,
string Account,
decimal? Price,
decimal? OrderQty,
string SecurityType,
string CfiCode,
string Symbol,
string SecurityExchange,
char? CashMargin,
decimal? Slippage,
bool? IsManual,
decimal? MinQty,
char? PositionEffect,
bool? PostOnly,
string SecondaryOrderId,
string StrategyId,
decimal? OldPrice,
decimal? OldVolume,
int? Leverage,
FixParty[] Parties,
char? Side,
char? TimeInForce,
DateTime? ExpiryDate,
decimal? MaxFloor,
string Text,
OrderCondition Condition)
{
/// <summary>
/// Order type (1=Market, 2=Limit, 3=Stop, etc.), when the replace states one. A stop's flavour is stated
/// here, as a registration states it, so a replaced stop stays the stop it was.
/// </summary>
public char? OrdType { get; init; }
}