namespace StockSharp.Fix.Native;
using StockSharp.Messages;
///
/// Data from NewOrderSingle FIX message.
///
/// Client order identifier.
/// Account identifier.
/// Order price.
/// Order quantity.
/// Maximum visible quantity (iceberg orders).
/// Security type.
/// CFI code (Classification of Financial Instruments).
/// Security symbol.
/// Security exchange code.
/// Order side (1=Buy, 2=Sell).
/// Order type (1=Market, 2=Limit, etc.).
/// Time in force (0=Day, 1=GTC, 3=IOC, 4=FOK, 6=GTD).
/// Order expiration date (for GTD orders).
/// Order condition (stop, take-profit, etc.).
/// Free text comment.
/// Party information (client, broker, etc.).
/// Order capacity (A=Agency, P=Principal, R=Riskless).
/// Order restrictions.
/// Cash margin indicator.
/// Allowed slippage for market orders.
/// Whether order is manual.
/// Minimum execution quantity.
/// Position effect (O=Open, C=Close).
/// Post-only flag (maker only).
/// Secondary order identifier.
/// Strategy identifier.
/// Leverage multiplier.
public record struct FixNewOrderSingle(
FixId ClOrdId,
string Account,
decimal? Price,
decimal? OrderQty,
decimal? MaxFloor,
string SecurityType,
string CfiCode,
string Symbol,
string SecurityExchange,
char? Side,
char? OrdType,
char? TimeInForce,
DateTime? ExpiryDate,
OrderCondition Condition,
string Text,
FixParty[] Parties,
char? OrderCapacity,
string OrderRestrictions,
char? CashMargin,
decimal? Slippage,
bool? IsManual,
decimal? MinQty,
char? PositionEffect,
bool? PostOnly,
string SecondaryOrderId,
string StrategyId,
int? Leverage)
{
///
/// Owning user's numeric id (broker extension, not a standard FIX tag). Carried over
/// the SBE wire so the StopOrder server can scope a stop to its owner by UserId — the
/// only safe key when a single proxy session (the OrderRouter) fronts all users.
///
public long UserId { get; set; }
///
/// Canonical portfolio identity — the broker's BrokerPortfolio PK (broker extension,
/// not a standard FIX tag). Carried over the SBE wire so the StopOrder/Algo server persists
/// the order's portfolio FK by id rather than the shared display name.
///
public long PortfolioId { get; set; }
///
/// The order's own id given by the side placing it (broker extension, not a standard FIX tag).
/// Carried over the SBE wire so whatever works the order knows it by that id, whichever connection
/// it arrived on.
///
public long? OrderId { get; set; }
}