question

Upvotes
Accepted
1 1 1 3

Contribution via RFA



We are attempting (Reiffeisenbank) to use RFA API (in JAVA) to make contributions to Testing Reuters Pages (called TEST=REIF).
So far we have been able to make contributions via Excel (sending (or uploading) values from Excel to TEST=REIF).
But now we would like to replace this Excel sheet by RFA API app.Among many examples that are part of the RFA library I have found
PostingConsumer example (can be found on the path Examples\com\reuters\rfa\example\omm\) to be a possible candidate to solve our problem.
This app contains a text file called post_input.txt with tag=value pairs.Can you please explain how to set up such file so that it works the same way
as the attached excel sheet that I am sending you below? Or is there a simpler way how to make the aforementioned contribution work with RFA API?
Kind regards,
Lukas Hluze,Reiffesenbank a.s.

treprfarfa-apipostingcontributions
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
11.5k 16 7 10

@lukas.hluze

For the MILP your application needs to “push” your data via the OMM Post message with the following conditions to the TREP server

  1. Off-stream post (post via the login stream)
  2. The data must be in the OMM update message
  3. No sequence number

Then, TREP will push that data to the MLIP server via the OMM Post message. The example of post_input.txt file for the above conditions is following

name=TPRIONIP=RAIF service= DCS_MARKETLINK type=offstream part=single sequence=false id=true UseRefreshLock=false ack=true userRightsMask=create attrib=attribInfo attribData=false payload=update_msg payloadMsgAttrib=attribInfo payloadMsgAttribData=false payloadMsgPayload=data

The RFA Java' StarterConsumer_Post example hard code a contribution data in the PostItemManager.java’s createPayloadOMMMsg() function. You can modify it to send your data with the following code as following

if (payloadDataType == OMMTypes.FIELD_LIST){
   // ***** Payload : Field List - Start ***** //
   _payloadOMMEncoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA, (short)0, (short)1, (short)0);
   //FID 22 (BID)
   _payloadOMMEncoder.encodeFieldEntryInit((short)22, OMMTypes.REAL);
   double value = 0.2;
   long longValue = Rounding.roundDouble2Long(value, OMMNumeric.EXPONENT_NEG4);
   _payloadOMMEncoder.encodeReal(longValue,OMMNumeric.EXPONENT_NEG4);


   //FID 25 (ASK)
   _payloadOMMEncoder.encodeFieldEntryInit((short)25, OMMTypes.REAL);
   value = -1.8;
   longValue = Rounding.roundDouble2Long(value, OMMNumeric.EXPONENT_NEG4);
   _payloadOMMEncoder.encodeReal(longValue,OMMNumeric.EXPONENT_NEG4);


   _payloadOMMEncoder.encodeAggregateComplete();
   // ***** Payload : Field List - End ***** //
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 1

Hi Lukas

I don't see an xl attachment on this post so not sure what fields are required or it it is ATS, MARKETLINK or other Service you are trying to contribute to so I'll cover both ATS and MLIP.

Use the following entries in the post_input.txt file

MARKETLINK

  • name=<RIC> i.e. TEST=REIF
  • service=MARKETLINK [or appropriate for the site]
  • type=offstream sequence=false payload=update_msg payloadMsgPayload=data
  • 'ack=' & 'id=' should either be both true or both false.

ATS

Can use the same settings as for MLIP with Service set to the ATS Service name. ATS does also support onstream Posting and sequence numbers if these are required.

The contribution data section for this seletion is in PostItemManager class from line 973.

if (payloadDataType == OMMTypes.FIELD_LIST)
{
// ***** Payload : Field List - Start ***** //
_payloadOMMEncoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA, (short)0,
(short)1, (short)0);
_payloadOMMEncoder.encodeFieldEntryInit((short)1, OMMTypes.UINT);
_payloadOMMEncoder.encodeUInt(400);
_payloadOMMEncoder.encodeAggregateComplete();
// ***** Payload : Field List - End ***** //
}

This contributes the value '400' to FID 1 (PROD_PERM) which would only work with an ATS RIC.
You will need add your desired fields and values etc here ensuring the correct types are used for the fields being updated.

Since the post_input.txt is read each time the app is run, in production you might want to change PostItemManager to just set the values in the code and not have it read this file each time.

/Maurice

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea