|
FIX 4.0 Demo 1.0
|
FIX 4.0 协议标签定义 More...

Go to the source code of this file.
Namespaces | |
| namespace | fix40 |
| namespace | tags |
| FIX 协议标签常量 | |
| namespace | fix40::tags |
Variables | |
| constexpr int | fix40::tags::BeginString = 8 |
| 协议版本标识,固定为 "FIX.4.0" | |
| constexpr int | fix40::tags::BodyLength = 9 |
| 消息体长度(从 Tag 35 到 CheckSum 前的字节数) | |
| constexpr int | fix40::tags::MsgType = 35 |
| 消息类型(如 "A"=Logon, "0"=Heartbeat, "5"=Logout) | |
| constexpr int | fix40::tags::SenderCompID = 49 |
| 发送方标识符 | |
| constexpr int | fix40::tags::TargetCompID = 56 |
| 接收方标识符 | |
| constexpr int | fix40::tags::MsgSeqNum = 34 |
| 消息序列号 | |
| constexpr int | fix40::tags::SendingTime = 52 |
| 发送时间(UTC 格式:YYYYMMDD-HH:MM:SS) | |
| constexpr int | fix40::tags::EncryptMethod = 98 |
| 加密方法(0=无加密) | |
| constexpr int | fix40::tags::HeartBtInt = 108 |
| 心跳间隔(秒) | |
| constexpr int | fix40::tags::ResetSeqNumFlag = 141 |
| 重置序列号标志 (Reset Sequence Number Flag) Y = 双方都将会话序列号重置为 1(通常在一方丢失持久化状态时使用) | |
| constexpr int | fix40::tags::TestReqID = 112 |
| 测试请求标识符 | |
| constexpr int | fix40::tags::Text = 58 |
| 文本消息(用于 Logout 原因等) | |
| constexpr int | fix40::tags::CheckSum = 10 |
| 校验和(消息所有字节之和 mod 256,3 位数字) | |
| constexpr int | fix40::tags::ClOrdID = 11 |
| 客户端订单ID (Client Order ID),必填,客户端生成用于唯一标识订单 | |
| constexpr int | fix40::tags::OrderID = 37 |
| 交易所/服务端订单ID (Order ID),服务端生成 | |
| constexpr int | fix40::tags::ExecID = 17 |
| 执行ID (Execution ID),每一笔成交或状态变化都应有唯一的执行ID | |
| constexpr int | fix40::tags::OrigClOrdID = 41 |
| 原始客户端订单ID (Original Client Order ID),撤单/改单时引用原订单 | |
| constexpr int | fix40::tags::ExecRefID = 19 |
| 执行引用ID (Exec Ref ID),当 ExecTransType 为 Cancel/Correct 时引用前一次的 ExecID | |
| constexpr int | fix40::tags::HandlInst = 21 |
| 处理指令 (Handling Instructions),FIX 4.0 必填。通常 '1'=Automated execution | |
| constexpr int | fix40::tags::Symbol = 55 |
| 标的代码 (Symbol),如 "IF2305", "AAPL" | |
| constexpr int | fix40::tags::Side = 54 |
| 买卖方向 (Side): 1=Buy, 2=Sell | |
| constexpr int | fix40::tags::OrderQty = 38 |
| 订单数量 (Order Quantity) | |
| constexpr int | fix40::tags::Price = 44 |
| 价格 (Price),限价单必填 | |
| constexpr int | fix40::tags::OrdType = 40 |
| 订单类型 (Order Type): 1=Market, 2=Limit | |
| constexpr int | fix40::tags::TransactTime = 60 |
| 交易时间 (Transaction Time),UTC 时间 | |
| constexpr int | fix40::tags::TimeInForce = 59 |
| 订单有效时间 (Time In Force): 0=Day, 1=GTC, 3=IOC, 4=FOK | |
| constexpr int | fix40::tags::CxlType = 125 |
| 撤单类型 (Cancel Type),FIX 4.0 撤单消息(F)必填。'F'=Full remaining quantity | |
| constexpr int | fix40::tags::OrdStatus = 39 |
| 订单状态 (Order Status) 0=New, 1=Partially Filled, 2=Filled, 4=Canceled, 8=Rejected | |
| constexpr int | fix40::tags::ExecTransType = 20 |
| 执行事务类型 (Execution Transaction Type) - FIX 4.0 核心字段 0=New, 1=Cancel, 2=Correct, 3=Status 注意:FIX 4.0 没有 ExecType(150),状态变化由本字段和 OrdStatus 共同表达 | |
| constexpr int | fix40::tags::CumQty = 14 |
| 累计成交数量 (Cumulative Quantity) | |
| constexpr int | fix40::tags::AvgPx = 6 |
| 平均成交价格 (Average Price) | |
| constexpr int | fix40::tags::LastShares = 32 |
| 本次成交数量 (Last Shares) - FIX 4.0 用于表达单次成交量 | |
| constexpr int | fix40::tags::LastPx = 31 |
| 本次成交价格 (Last Price) - FIX 4.0 用于表达单次成交价 | |
| constexpr int | fix40::tags::OrdRejReason = 103 |
| 订单拒绝原因 (Order Reject Reason) | |
| constexpr int | fix40::tags::BeginSeqNo = 7 |
| 起始序列号 (Begin Sequence Number),用于 ResendRequest | |
| constexpr int | fix40::tags::EndSeqNo = 16 |
| 结束序列号 (End Sequence Number),用于 ResendRequest | |
| constexpr int | fix40::tags::NewSeqNo = 36 |
| 新序列号 (New Sequence Number),用于 SequenceReset | |
| constexpr int | fix40::tags::GapFillFlag = 123 |
| GapFill 标志 (Gap Fill Flag),用于 SequenceReset Y = Gap Fill 模式,N = Reset 模式 | |
| constexpr int | fix40::tags::PossDupFlag = 43 |
| 可能重复标志 (Possible Duplicate Flag) Y = 消息可能是重复的 | |
| constexpr int | fix40::tags::OrigSendingTime = 122 |
| 原始发送时间 (Original Sending Time) 重传消息时使用,记录原始发送时间 | |
| constexpr int | fix40::tags::Account = 1 |
| 账户标识 (Account) | |
| constexpr int | fix40::tags::RequestID = 10001 |
| 请求ID,用于将响应匹配到请求 | |
| constexpr int | fix40::tags::Balance = 10002 |
| 账户余额 (静态权益) | |
| constexpr int | fix40::tags::Available = 10003 |
| 可用资金 | |
| constexpr int | fix40::tags::FrozenMargin = 10004 |
| 冻结保证金 | |
| constexpr int | fix40::tags::UsedMargin = 10005 |
| 占用保证金 | |
| constexpr int | fix40::tags::PositionProfit = 10006 |
| 持仓盈亏 (浮动盈亏) | |
| constexpr int | fix40::tags::CloseProfit = 10007 |
| 平仓盈亏 (已实现盈亏) | |
| constexpr int | fix40::tags::DynamicEquity = 10008 |
| 动态权益 | |
| constexpr int | fix40::tags::RiskRatio = 10009 |
| 风险度 | |
| constexpr int | fix40::tags::InstrumentID = 10010 |
| 合约ID | |
| constexpr int | fix40::tags::LongPosition = 10011 |
| 多头持仓 | |
| constexpr int | fix40::tags::ShortPosition = 10012 |
| 空头持仓 | |
| constexpr int | fix40::tags::LongAvgPrice = 10013 |
| 多头均价 | |
| constexpr int | fix40::tags::ShortAvgPrice = 10014 |
| 空头均价 | |
| constexpr int | fix40::tags::PositionQty = 10015 |
| 持仓数量 (用于持仓列表中的单条记录) | |
| constexpr int | fix40::tags::PositionSide = 10016 |
| 持仓方向 (1=多头, 2=空头) | |
| constexpr int | fix40::tags::PositionAvgPrice = 10017 |
| 持仓均价 | |
| constexpr int | fix40::tags::PositionMargin = 10018 |
| 持仓保证金 | |
| constexpr int | fix40::tags::NoPositions = 10019 |
| 记录数量 (用于列表响应) | |
| constexpr int | fix40::tags::UpdateType = 10020 |
| 更新类型 (1=账户更新, 2=持仓更新, 3=成交通知) | |
| constexpr int | fix40::tags::UpdateReason = 10021 |
| 更新原因 (1=行情变化, 2=成交, 3=出入金) | |
| constexpr int | fix40::tags::SearchPattern = 10022 |
| 搜索关键字(合约代码前缀) | |
| constexpr int | fix40::tags::MaxResults = 10023 |
| 搜索结果数量上限 | |
| constexpr int | fix40::tags::ResultCount = 10024 |
| 搜索结果数量 | |
| constexpr int | fix40::tags::InstrumentList = 10025 |
| 合约列表(逗号分隔) | |
| constexpr int | fix40::tags::ExchangeID = 10026 |
| 交易所代码 | |
| constexpr int | fix40::tags::ProductID = 10027 |
| 品种代码 | |
| constexpr int | fix40::tags::PriceTick = 10028 |
| 最小变动价位 | |
| constexpr int | fix40::tags::VolumeMultiple = 10029 |
| 合约乘数 | |
| constexpr int | fix40::tags::MarginRate = 10030 |
| 保证金率 | |
FIX 4.0 协议标签定义
定义 FIX 协议中使用的标准标签(Tag)编号。 每个标签对应消息中的一个字段。