2015年5月18日 星期一

[FIX Protocol] Understanding OrdStatus[39] and ExecType[150] in FIX4.4

Both are for Execution Report[8], while ...

OrdStatus[39] identifies current status of order.

Valid values:
0 = New
1 = Partially filled
2 = Filled
3 = Done for day
4 = Canceled
<5 has been removed~!>
6 = Pending Cancel (e.g. result of Order Cancel Request <F>)
7 = Stopped
8 = Rejected
9 = Suspended
A = Pending New
B = Calculated
C = Expired
D = Accepted for bidding


ExecType[150] describes the specific ExecutionRpt. (I guess it implies the action just executed on sell side ... Rather than the current status of that order, separated terms with different "nature")

Valid values:
0 = New
3 = Done for day
4 = Canceled
5 = Replace
6 = Pending Cancel (e.g. result of Order Cancel Request <F>)
7 = Stopped
8 = Rejected
9 = Suspended
A = Pending New
B = Calculated
C = Expired
D = Restated (ExecutionRpt sent unsolicited by sellside, with ExecRestatementReason <378> (378) set)
E = Pending Replace (e.g. result of Order Cancel/Replace Request <G>)
F = Trade (partial fill or fill)
G = Trade Correct (formerly an ExecTransType <20> (20))
H = Trade Cancel (formerly an ExecTransType <20>)


Oh, my supervisor gave me this one to read then ... And I have read for around an hour to figure out more on the difference between ExecType & OrdStatus ... together with the behaviour of amending orders: 
http://www.fixdeveloper.com/2014/05/fix-44-order-state-change-matrices.html

An example captured:


C.3 - Replace to decrease quantity 

C.3.a - Cancel/replace request sent whilst execution is being reported, the requested order qty exceeds the cum qty. Order is replaced then filled

TimeMessage Received (ClOrdID, OrigClOrdID)Message Sent (ClOrdID, OrigClOrdID)Exec TypeOrdStatusOrder QtyCum QtyLeaves QtyLast QtyComment
1New Order(X)10000
2Execution(X)RejectedRejected10000000If order is rejected
2Execution(X)NewNew100000100000
3Execution(X)TradePartially Filled10000100090001000Execution for 1000
4Replace Request(Y,X)8000Request a decrease order quantity to 8000 (leaving 7000 open)
4Execution(X)TradePartially Filled1000015008500500Execution for 500 sent. Replace request and this execution report pass each other on the connection
5Cancel Reject (Y,X)Partially FilledIf request is rejected by salesperson
5Execution (Y,X)Pending ReplacePending Replace10000150085000"Pending replace" order status takes precedence over "partially filled" order status
6Execution(X)TradePending Replace1000016008400100Execution for 100 occurs before cancel/replace request is accepted
7Cancel Reject (Y,X)Partially FilledIf request is rejected by trader/exchange
7Execution (Y,X)ReplacePartially Filled8000160064000Replace is accepted as requested order qty exceeds cum qty
8Execution (Y)TradeFilled8000800006400Execution for 6400.

沒有留言:

張貼留言

Weight Loss! The journey continues

是一個漫長的奮鬥旅程…… 最近嘗試努力改變的生活習慣: 晚上九時半去瞓覺 瞓覺前唔用電子奶咀,即喺ipad同手提電話(因為呢家部電話用耐咗,會無電要叉過夜) 用蔬果代替日常零食,例子有:車厘茄、藍莓、士多啤梨、粟米芯、提子,都係細細地嘅一舊一舊comp食啲 唔食熱氣零食 安靜去每...