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.

沒有留言:

張貼留言

[康復路] 試完又試

見了醫生,因為血色素又變低了,醫生想檢查是否「缺鐵」為成因,檢查又檢查…… 感覺有些麻煩……又抽血,又要留樣本…… 令我回想起當日入院的時光,因為一些原因,留樣本只需留一次,免卻留三次的麻煩;現在每天都要留一次,連續三天。每天早上就要跑醫院一趟再上班。 幸好也完成了。 第二次抽血...