Expand description
§refix-fix42
Typed FIX 4.2 messages for ReFIX,
generated from QuickFIX’s FIX42.xml.
use bytes::Bytes;
use refix::message::{Decimal, TimePrecision, Tokenizer, UtcTimestamp};
use refix_fix42::{HandlInst, Message, OrdType, Side};
let frame = "8=FIX.4.2|9=123|35=D|49=SENDER|56=TARGET|34=1|52=20261008-09:30:00|\
11=ORDER-1|21=1|55=ACME|54=1|60=20261008-09:30:00|40=2|44=101.25|38=100|10=142|";
let raw = Tokenizer::default()
.tokenize(Bytes::from(frame.replace('|', "\x01")))
.unwrap();
let Message::NewOrderSingle(order) = Message::from_raw(raw) else {
panic!("expected a NewOrderSingle");
};
assert_eq!(order.header().sender_comp_id(), Ok(Some("SENDER")));
assert_eq!(order.header().msg_seq_num(), Ok(Some(1)));
assert_eq!(order.cl_ord_id(), Ok(Some("ORDER-1")));
assert_eq!(
order.handl_inst(),
Ok(Some(HandlInst::AutomatedExecutionNoIntervention))
);
assert_eq!(order.symbol(), Ok(Some("ACME")));
assert_eq!(order.side(), Ok(Some(Side::Buy)));
assert_eq!(order.ord_type(), Ok(Some(OrdType::Limit)));
assert_eq!(order.price(), Ok(Some(Decimal::new(10125, -2))));
assert_eq!(
order.transact_time(),
Ok(Some(UtcTimestamp::new(1_791_451_800_000_000_000, TimePrecision::SECONDS)))
);Message::from_raw reads each message as the type its MsgType names, and any
other as Message::Unrecognized.
§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
The code is generated from QuickFIX’s FIX42.xml, under the QuickFIX Software
License (LICENSE-QUICKFIX). This product includes software
developed by quickfixengine.org (http://www.quickfixengine.org/).
Modules§
- allocation
- bid_
request - bid_
response - execution_
report - ioi
- list_
status - list_
strike_ price - logon
- market_
data_ incremental_ refresh - market_
data_ request - market_
data_ snapshot_ full_ refresh - mass_
quote - new_
order_ list - new_
order_ single - news
- order_
cancel_ replace_ request - quote_
acknowledgement - quote_
cancel - quote_
request - security_
definition - security_
definition_ request
Structs§
- Advertisement
- The
Advertisement(35=7) message. - Allocation
- The
Allocation(35=J) message. - Allocation
Instruction Ack - The
AllocationInstructionAck(35=P) message. - BidRequest
- The
BidRequest(35=k) message. - BidResponse
- The
BidResponse(35=l) message. - Business
Message Reject - The
BusinessMessageReject(35=j) message. - Dont
Know Trade - The
DontKnowTrade(35=Q) message. - The
Email(35=C) message. - Execution
Report - The
ExecutionReport(35=8) message. - Header
- The header fields of a message.
- Heartbeat
- The
Heartbeat(35=0) message. - IOI
- The
IOI(35=6) message. - List
Cancel Request - The
ListCancelRequest(35=K) message. - List
Execute - The
ListExecute(35=L) message. - List
Status - The
ListStatus(35=N) message. - List
Status Request - The
ListStatusRequest(35=M) message. - List
Strike Price - The
ListStrikePrice(35=m) message. - Logon
- The
Logon(35=A) message. - Logout
- The
Logout(35=5) message. - Market
Data Incremental Refresh - The
MarketDataIncrementalRefresh(35=X) message. - Market
Data Request - The
MarketDataRequest(35=V) message. - Market
Data Request Reject - The
MarketDataRequestReject(35=Y) message. - Market
Data Snapshot Full Refresh - The
MarketDataSnapshotFullRefresh(35=W) message. - Mass
Quote - The
MassQuote(35=i) message. - NewOrder
List - The
NewOrderList(35=E) message. - NewOrder
Single - The
NewOrderSingle(35=D) message. - News
- The
News(35=B) message. - Order
Cancel Reject - The
OrderCancelReject(35=9) message. - Order
Cancel Replace Request - The
OrderCancelReplaceRequest(35=G) message. - Order
Cancel Request - The
OrderCancelRequest(35=F) message. - Order
Status Request - The
OrderStatusRequest(35=H) message. - Quote
- The
Quote(35=S) message. - Quote
Acknowledgement - The
QuoteAcknowledgement(35=b) message. - Quote
Cancel - The
QuoteCancel(35=Z) message. - Quote
Request - The
QuoteRequest(35=R) message. - Quote
Status Request - The
QuoteStatusRequest(35=a) message. - Reject
- The
Reject(35=3) message. - Resend
Request - The
ResendRequest(35=2) message. - Security
Definition - The
SecurityDefinition(35=d) message. - Security
Definition Request - The
SecurityDefinitionRequest(35=c) message. - Security
Status - The
SecurityStatus(35=f) message. - Security
Status Request - The
SecurityStatusRequest(35=e) message. - Sequence
Reset - The
SequenceReset(35=4) message. - Settlement
Instructions - The
SettlementInstructions(35=T) message. - Test
Request - The
TestRequest(35=1) message. - Trading
Session Status - The
TradingSessionStatus(35=h) message. - Trading
Session Status Request - The
TradingSessionStatusRequest(35=g) message. - Trailer
- The trailer fields of a message.
Enums§
- Adjustment
- The values of the
Adjustment(334) field. - AdvSide
- The values of the
AdvSide(4) field. - AdvTrans
Type - The values of the
AdvTransType(5) field. - Alloc
Handl Inst - The values of the
AllocHandlInst(209) field. - Alloc
Link Type - The values of the
AllocLinkType(197) field. - Alloc
RejCode - The values of the
AllocRejCode(88) field. - Alloc
Status - The values of the
AllocStatus(87) field. - Alloc
Trans Type - The values of the
AllocTransType(71) field. - Basis
PxType - The values of the
BasisPxType(419) field. - Benchmark
- The values of the
Benchmark(219) field. - BidRequest
Trans Type - The values of the
BidRequestTransType(374) field. - Business
Reject Reason - The values of the
BusinessRejectReason(380) field. - Comm
Type - The values of the
CommType(13) field. - Corporate
Action - The values of the
CorporateAction(292) field. - Covered
OrUncovered - The values of the
CoveredOrUncovered(203) field. - Customer
OrFirm - The values of the
CustomerOrFirm(204) field. - CxlRej
Reason - The values of the
CxlRejReason(102) field. - CxlRej
Response To - The values of the
CxlRejResponseTo(434) field. - DKReason
- The values of the
DKReason(127) field. - Delete
Reason - The values of the
DeleteReason(285) field. - Discretion
Inst - The values of the
DiscretionInst(388) field. - Email
Type - The values of the
EmailType(94) field. - Encrypt
Method - The values of the
EncryptMethod(98) field. - Exec
Inst - The values of the
ExecInst(18) field. - Exec
Restatement Reason - The values of the
ExecRestatementReason(378) field. - Exec
Trans Type - The values of the
ExecTransType(20) field. - Exec
Type - The values of the
ExecType(150) field. - Financial
Status - The values of the
FinancialStatus(291) field. - GTBooking
Inst - The values of the
GTBookingInst(427) field. - Halt
Reason Char - The values of the
HaltReasonChar(327) field. - Handl
Inst - The values of the
HandlInst(21) field. - IDSource
- The values of the
IDSource(22) field. - IOIQlty
Ind - The values of the
IOIQltyInd(25) field. - IOIQualifier
- The values of the
IOIQualifier(104) field. - IOIShares
- The values of the
IOIShares(27) field. - IOITrans
Type - The values of the
IOITransType(28) field. - IncTax
Ind - The values of the
IncTaxInd(416) field. - Last
Capacity - The values of the
LastCapacity(29) field. - Liquidity
IndType - The values of the
LiquidityIndType(409) field. - List
Exec Inst Type - The values of the
ListExecInstType(433) field. - MDEntry
Type - The values of the
MDEntryType(269) field. - MDReq
RejReason - The values of the
MDReqRejReason(281) field. - MDUpdate
Action - The values of the
MDUpdateAction(279) field. - MDUpdate
Type - The values of the
MDUpdateType(265) field. - Message
- A message read as the type its MsgType names.
- Message
Encoding - The values of the
MessageEncoding(347) field. - Misc
FeeType - The values of the
MiscFeeType(139) field. - MsgDirection
- The values of the
MsgDirection(385) field. - MsgType
- The values of the
MsgType(35) field. - Multi
LegReporting Type - The values of the
MultiLegReportingType(442) field. - NetGross
Ind - The values of the
NetGrossInd(430) field. - Open
Close - The values of the
OpenClose(77) field. - Open
Close Settle Flag - The values of the
OpenCloseSettleFlag(286) field. - OrdRej
Reason - The values of the
OrdRejReason(103) field. - OrdStatus
- The values of the
OrdStatus(39) field. - OrdType
- The values of the
OrdType(40) field. - Price
Type - The values of the
PriceType(423) field. - Process
Code - The values of the
ProcessCode(81) field. - Prog
RptReqs - The values of the
ProgRptReqs(414) field. - PutOr
Call - The values of the
PutOrCall(201) field. - Quote
Cancel Type - The values of the
QuoteCancelType(298) field. - Quote
Condition - The values of the
QuoteCondition(276) field. - Quote
Entry Reject Reason - The values of the
QuoteEntryRejectReason(368) field. - Quote
Reject Reason - The values of the
QuoteRejectReason(300) field. - Quote
Request Type - The values of the
QuoteRequestType(303) field. - Quote
Response Level - The values of the
QuoteResponseLevel(301) field. - Quote
Status - The values of the
QuoteStatus(297) field. - Routing
Type - The values of the
RoutingType(216) field. - Rule80A
- The values of the
Rule80A(47) field. - Security
Request Type - The values of the
SecurityRequestType(321) field. - Security
Response Type - The values of the
SecurityResponseType(323) field. - Security
Trading Status - The values of the
SecurityTradingStatus(326) field. - Security
Type - The values of the
SecurityType(167) field. - Session
Reject Reason - The values of the
SessionRejectReason(373) field. - Settl
Inst Mode - The values of the
SettlInstMode(160) field. - Settl
Inst Source - The values of the
SettlInstSource(165) field. - Settl
Inst Trans Type - The values of the
SettlInstTransType(163) field. - Settl
Location - The values of the
SettlLocation(166) field. - Settlmnt
Typ - The values of the
SettlmntTyp(63) field. - Side
- The values of the
Side(54) field. - Stand
Inst DbType - The values of the
StandInstDbType(169) field. - Subscription
Request Type - The values of the
SubscriptionRequestType(263) field. - Tick
Direction - The values of the
TickDirection(274) field. - Time
InForce - The values of the
TimeInForce(59) field. - Trad
SesMethod - The values of the
TradSesMethod(338) field. - Trad
SesMode - The values of the
TradSesMode(339) field. - Trad
SesStatus - The values of the
TradSesStatus(340) field. - Trade
Condition - The values of the
TradeCondition(277) field. - Trade
Type - The values of the
TradeType(418) field. - Urgency
- The values of the
Urgency(61) field.
Constants§
- DIALECT
- The dialect of this dictionary.