The following tests will be done with client application logged on.
Account Data Request: One Account
1) Send Account Data Request for <Account ID 1> and SubscriptionRequestType = 0 (Snapshot).
2) Receive Account Data Report.
3) Confirm values of fields Account (1), AccountName (20010), Currency (15), TotalEndingCashBalance (20020), OpenTradeEquity (20018), AsOfDate (20011), and LastRptRequested (50912).
Account Data Request: All Authorized Accounts
1) Send Account Data Request without Account field specified and SubscriptionRequestType=0 (Snapshot) to obtain snapshot reports on all accounts your trader is authorized to.
2) Receive several Account Data Reports.
3) Confirm the values of the following fields for each report message: Account (1), AccountName (20010), TotalEndingCashBalance (20020), OpenTradeEquity (20018), AsOfDate (20011), and LastRptRequested (50912).
Account Data Request with Subscription
1) Send Account Data Request for <Account ID 1> and SubscriptionRequestType = 1.
2) Receive Account Data Report. Confirm the value of UnsolicitedIndicator (325) and TotalEndingCashBalance (20020).
3) Account balance will be modified externally at this point (as if it were done by FCM).
4) Receive Account Data Report. Confirm the value of UnsolicitedIndicator (325) and TotalEndingCashBalance (20020).
Order Mass Status: No Current Day Orders
1) Send Order Mass Status request for <Account ID 2>.
2) Receive Order Mass Status Request Ack (UBR). Confirm the value of ReqResult (20022).
Order Mass Status: With Current Day Orders
1) Send Order Mass Status request for <Account ID 1>.
2) Receive Execution Reports for current day orders (including rejected, filled, cancelled, and working ones).
3) Receive Order Mass Status Request Ack (UBR). Confirm the value of ReqResult (20022).
Order Mass Status: With Current Day Orders, All Authorized Accounts
1) Send Order Mass Status without Account field specified.
2) Receive Execution Reports for current day orders (including rejected, filled, cancelled, and working ones) for all accounts a trader is authorized to.
3) Receive Order Mass Status Request Ack (UBR). Confirm the value of ReqResult (20022).
Request for Positions: No Open Positions
1) Account positions will be reset externally at this point.
2) Send Request for Position for <Account ID 2>, SubscriptionRequestType = 2, and PosReqType = 0.
3) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Positions: With Open Positions
1) Send Request for Position for <Account ID 1>, SubscriptionRequestType = 0, and PosReqType = 0.
2) Receive Position Report(s).
3) Confirm field values: Account (1), LastShares (32), Side (54), Symbol (55), and ProfitLossAndOTE (20002).
4) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Positions: With Open Positions, All Authorized Accounts
1) Send Request for Position without Account field specified, SubscriptionRequestType = 0, and PosReqType = 0.
2) Receive Position Report(s).
3) Confirm field values: Account (1), LastShares (32), Side (54), Symbol (55), and ProfitLossAndOTE (20002).
4) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Positions with Subscription
1) Send Request for Position for <Account ID 1>, SubscriptionRequestType = 1, and PosReqType = 0.
2) Receive Position Report(s).
3) Confirm field values: UnsolicitedIndicator (325), Account (1), LastShares (32), Side (54), Symbol (55), and ProfitLossAndOTE (20002).
4) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
5) A position will be removed externally at this point.
6) Receive Position Report(s).
7) Confirm field values: UnsolicitedIndicator (325), Account (1), LastShares (32), Side (54), Symbol (55), and ProfitLossAndOTE (20002).
8) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Trades: No Current Day Fills
1) Send Request for Position for <Account ID 2> and PosReqType = 1.
2) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Trades: With Current Day Fills
1) Send Request for Position for <Account ID 1>, SubscriptionRequestType = 0 and PosReqType = 1.
2) Receive Position report(s) with current day fills.
3) Confirm field values: Account (1), LastShares (32), Side (54), Symbol (55), Currency (15), AvgPx (6), OrderID (37), ClearingBusinessDate (50715), and StatementDate (20023).
4) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Trades: With Current Day Fills, All Authorized Accounts
1) Send Request for Position for <Account ID 1>, SubscriptionRequestType = 0 and PosReqType = 1. If no account provided, then Position Reports are created for all accounts client is authorized for.
2) Receive Position report(s) with current day fills.
3) Confirm field values: Account (1), LastShares (32), Side (54), Symbol (55), Currency (15), AvgPx (6), OrderID (37), ClearingBusinessDate (50715) and StatementDate (20023).
4) Receive Request for Positions Ack (UAO). Confirm the value of PosReqResult (50728).
Request for Trades with Subscription
1) Send Request for Position for <Account ID 1>, SubscriptionRequestType = 1 and PosReqType = 1.
2) Receive Business Message reject.