Capital Markets Adapters 10.7 | Apama Capital Markets Adapters Documentation 10.7 | Reuters MAPI Adapter | Password management
 
Password management
The Matching service requires that all passwords conform to specific password complexity rules. Passwords are not case sensitive. However when changing a Matching password in a FIX session login (35=A) or User level login (35=BE), the new password must comply with the following rules:
*A password may only consist of alphabetic characters or digits
*There must be at least 3 characters that are different at corresponding positions in the old and new passwords
*A password may not contain consecutive instances of the same character
*Minimum length = 6 characters
*Maximum length = 30 characters
*Minimum number of digits= 1
*Maximum number of digits = 5
The very first time you receive credentials from Reuters for both session or trader/user login, you need to reset default password . Here the password given by Reuters will be expired and you need to change it.If the "Password Expired" UserResponse is sent by the MAPI server, then user can request for change of password using:

com.apama.fix.mapi.PasswordChangeRequest {string TRANSPORT;
string requestId;
string userId;string senderSubId;
string oldPassword;
string newPassword;}
Example:

com.apama.fix.mapi.PasswordChangeRequest("MAPI_TRADING","456","ASP",
"123","234","345")
If the password is changed successfully, PasswordChangeResponse("MAPI_TRADING", "456", "ASP",true,"5","PasswordChanged"); is received.
For Session login, you have the following transport properties
<!-- Username -->
<property name="StaticField.body.A.553" value="@USERNAME@"/>
<!-- Password -->
<property name="StaticField.body.A.554" value="@PASSWORD@"/>
The very first time you are trying to login to MFG, you need to send tag 925 carrying new password in message type 'A' as,
<!-- New Password -->
<property name="StaticField.body.A.925" value="@NEW_PASSWORD@"/>
In case of Session login, if the given password doesn’t meet above standards, it will not establish session and keeps throwing error ‘connection reset by peer’. It is the client’s responsibility to make sure that the password is well formed. Once password is changed, it will never expire. From the next run, you need not add below property in .dist file,
<property name="StaticField.body.A.925"
value="@NEW_PASSWORD@"/>
For User/Trader login,
For the very first time, you can add tag 925 with new password and 924=1 to extra params to change password and login successfully. In case of user/trader login, if the given password doesn’t meet above standards, you get an error message in User response (35=BF) as ‘Not logged in’.
Here, you have two ways,
1. The monitor will automatically generate a well-formed password for you and send user login request. If you were able to login successfully and password is changed, monitor will route ‘PasswordChangeResponse’ . The external application should handle this event.
2. Else, client can send ‘PasswordChangeRequest’ on receiving this error. Monitor will send user login request. If you were able to login successfully and password is changed, monitor will route ‘PasswordChangeResponse’. The external application should handle this event.
Event injection order:
1. Configure MAPI FIX session using
com.apama.fix.mapi.SessionConfiguration("FIXTransport",{"FixChannel":"FIX"})
2. Configure MAPI RFA session using

com.apama.rfa.mapi.SessionConfiguration("ReutersRFATransport",
{"applicationType":"MAPI","channel":"MAPI_RFA",
"RFASessionName":"testNM::testSession2","logLevel":"DEBUG",
"FIX_TRANSPORT":"FIXTransport"})
3. Subscribe for status message using

com.apama.statusreport.SubscribeStatus(“MAPI-FIX”,” Adapter”,””,”FIXTransport”)
com.apama.statusreport.SubscribeStatus(“MAPI”,” Adapter”,””,”RFATransport”)
4. If user is interested in trading, he needs to login as trader using

com.apama.fix.mapi.UserLogonRequest("FIXTransport","", "trading_user",
"progress","APAMA",{})
5. To login to P2PS server
com.apama.rfa.mapi.Login("ReutersRFATransport","fix_session_user",{})
6. Subscribe data
Market view:

com.apama.marketdata.SubscribeTick(“MAPI“,
"ReutersRFATransport","AUD=",{})

com.apama.marketdata.SubscribeDepth(“MAPI“,
"ReutersRFATransport","AUD=",{})
Screened view:

com.apama.marketdata.SubscribeTick("MAPI",
"ReutersRFATransport","AUD=NNLGO",{“Screened_Price”:”true”})

com.apama.marketdata.SubscribeDepth("MAPI“,
"ReutersRFATransport","AUD=NNLGO",{“Screened_Price”:”true”})
7. Place order

com.apama.oms.NewOrder("3","eur/usd",53.025,"BUY","LIMIT",20,"MAPI-FIX","",
"","FIXTransport","","", {"167":"FXSPOT","59":"0","Header:50":"APAMA",
"854":"1","231":"1000000.0","15":"eur","1":"RBCL","1138":"10","1028":"Y"})
8. Cancel order
com.apama.oms.CancelOrder("2","MAPI-FIX",{"Header:50":"APAMA"})
9. Unsubscription

com.apama.marketdata.UnsubscribeDepth("MAPI",
"ReutersRFATransport","AUD=",{})
10. Logoff from RFA MAPI
com.apama.rfa.mapi.Logout("ReutersRFATransport","fix_session_user",{})
11. Trader logoff

com.apama.fix.mapi.UserLogoutRequest("FIXTransport","","trading_user", "APAMA")
12. FIX Session logoff
com.apama.fix.doLogout("FIXTransport")
When FIX session disconnects, RFA session will be automatically loggedoff.
Note:
com.apama.rfa.mapi.Login now uses the username of the FIX session login, com.apama.fix.mapi.UserLogonRequest carries the trader’s username and senderSubID. SenderSubID identifies the originating user in received application messages. The value must be unique within each client SendercompID and captured as part of the administration process. It need be same as User login ID but can be. For post trade processing it is suggested that this value is set to the user long name. In every new order or cancel order, you should have "Header:50" which is senderSubID used in UserLogonRequest.