question

Upvotes
Accepted
1 1 1 3

Can someone please share raw response return from Refinitiv for SFC C++ and RFA Java.

We are planning to migrate an app from SFC C++ to RFA Java.Our app act as a relay server.

Can someone please share raw response of RIC return from Refinitiv for SFC C++ and RFA Java.(SOURCE - ELECTRON_DD )

Coud you please let us know if response format is different for both SDK and if yes, then how we can change format of RFA to SFC ?

rfarfa-apijavac++sfcmigrationsfc-api
icon clock
10 |1500

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

Upvote
Accepted
25.4k 90 13 25

Hi @piyush29prajapati

Can you please share your reasons/need for migrating from SFC to RFA?

We would strongly advise against making the effort to migrate from SFC to RFA. Both SFC and RFA are legacy APIs - they are feature complete and may well be "end of life" in the coming years.

We strongly recommend any migration from SFC or RFA to our newer strategic RT-SDK APIs e.g. Enterprise Message API - EMA which is available in both C++ and Java versions.

You may find the following articles of use:
Choosing your Refinitiv Real-Time Streaming API | Refinitiv Developers
Migrating from our Legacy APIs to our Strategic APIs | Refinitiv Developers
Migrating from the Legacy SFC API to the Enterprise Message API (EMA) | Refinitiv Developers

in terms of output from RFA and EMA, both provide payloads of Field Value pairs e.g.

Payload dataType="FieldList"
        FieldList FieldListNum="79" DictionaryId="1"
            FieldEntry fid="1" name="PROD_PERM" dataType="UInt" value="62"
            FieldEntry fid="2" name="RDNDISPLAY" dataType="UInt" value="64"
            FieldEntry fid="3" name="DSPLY_NAME" dataType="Rmtes" value="INTL BUS MACHINE"
            FieldEntry fid="4" name="RDN_EXCHID" dataType="Enum" value="2"
            FieldEntry fid="6" name="TRDPRC_1" dataType="Real" value="(blank data)"
            FieldEntry fid="7" name="TRDPRC_2" dataType="Real" value="(blank data)"
            FieldEntry fid="8" name="TRDPRC_3" dataType="Real" value="(blank data)"
            FieldEntry fid="9" name="TRDPRC_4" dataType="Real" value="(blank data)"
            FieldEntry fid="10" name="TRDPRC_5" dataType="Real" value="(blank data)"
            FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="(blank data)"
            FieldEntry fid="12" name="HIGH_1" dataType="Real" value="(blank data)"
            FieldEntry fid="13" name="LOW_1" dataType="Real" value="(blank data)"
            FieldEntry fid="14" name="PRCTCK_1" dataType="Enum" value="2"
            FieldEntry fid="15" name="CURRENCY" dataType="Enum" value="840"
            FieldEntry fid="16" name="TRADE_DATE" dataType="Date" value="14 JUN 2022"
            FieldEntry fid="18" name="TRDTIM_1" dataType="Time" value="20:00:00:000:000:000"
            FieldEntry fid="19" name="OPEN_PRC" dataType="Real" value="(blank data)"
            FieldEntry fid="21" name="HST_CLOSE" dataType="Real" value="135.720000"
            FieldEntry fid="22" name="BID" dataType="Real" value="(blank data)"
            FieldEntry fid="23" name="BID_1" dataType="Real" value="(blank data)"
            FieldEntry fid="24" name="BID_2" dataType="Real" value="(blank data)"
            FieldEntry fid="25" name="ASK" dataType="Real" value="(blank data)"
            FieldEntry fid="26" name="ASK_1" dataType="Real" value="(blank data)"
            FieldEntry fid="27" name="ASK_2" dataType="Real" value="(blank data)"
            FieldEntry fid="28" name="NEWS" dataType="Rmtes" value="YYYY"
            FieldEntry fid="29" name="NEWS_TIME" dataType="Time" value="20:32:00:000:000:000"
            FieldEntry fid="30" name="BIDSIZE" dataType="Real" value="(blank data)"
            FieldEntry fid="31" name="ASKSIZE" dataType="Real" value="(blank data)"
            FieldEntry fid="32" name="ACVOL_1" dataType="Real" value="(blank data)"
            FieldEntry fid="34" name="EARNINGS" dataType="Real" value="6.2674"
            FieldEntry fid="35" name="YIELD" dataType="Real" value="4.8630"
            FieldEntry fid="36" name="PERATIO" dataType="Real" value="21.6550"
            FieldEntry fid="37" name="DIVIDENDTP" dataType="Enum" value="0"
            FieldEntry fid="38" name="DIVPAYDATE" dataType="Date" value="10 JUN 2022"
            FieldEntry fid="39" name="EXDIVDATE" dataType="Date" value="09 MAY 2022"
            FieldEntry fid="40" name="CTS_QUAL" dataType="Enum" value="0"
            FieldEntry fid="42" name="BLKCOUNT" dataType="Real" value="(blank data)"
            FieldEntry fid="43" name="BLKVOLUM" dataType="Real" value="(blank data)"
            FieldEntry fid="53" name="TRD_UNITS" dataType="Enum" value="6"
            FieldEntry fid="56" name="PCTCHNG" dataType="Real" value="(blank data)"
            FieldEntry fid="58" name="DJTIME" dataType="Time" value="(blank data)"
            FieldEntry fid="60" name="CLOSE_BID" dataType="Real" value="135.740000"
            FieldEntry fid="61" name="CLOSE_ASK" dataType="Real" value="135.780000"
            FieldEntry fid="71" name="DIVIDEND" dataType="Real" value="6.6000"
            FieldEntry fid="75" name="UPLIMIT" dataType="Real" value="(blank data)"
            FieldEntry fid="76" name="LOLIMIT" dataType="Real" value="(blank data)"
            FieldEntry fid="77" name="NUM_MOVES" dataType="Real" value="(blank data)"
            FieldEntry fid="78" name="OFFCL_CODE" dataType="Rmtes" value="000459200101"
            FieldEntry fid="79" name="HSTCLSDATE" dataType="Date" value="14 JUN 2022"
            FieldEntry fid="90" name="YRHIGH" dataType="Real" value="144.7000"
            FieldEntry fid="91" name="YRLOW" dataType="Real" value="114.5850"

and so on..

Parsing and extracting the data from the payload is much simpler in EMA than in RFA - tens of lines of code in EMA - compared to 100+ lines of code in RFA.

EMA is much easier to learn than RFA, much less code to write and therefore less code to debug and maintain.


icon clock
10 |1500

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

@umer.nalla Are both SDK(SFC C++ and RFA Java) response is in same format for same request ?

@umer.nalla Do you have any sample code for parsing and extraction for RFA. We need to estimate the complexity in RFA.


Upvotes
1 1 1 3

@umer.nalla

When I debugged the SFC C++ app I got below raw response .

response=Map(250)
1="8046"
10="+94.30"
100="+0"
1000="%XXX"
1001="Size"
1002="Last"
1010="09:01:42"
1011="09:01:08"
1012="09:00:29"
1013="08:59:41"
1014="08:59:04"
10171="+
1021="+0"
1028="           "
103="0"
104="0"
1051="           "
1055="0"
1057="+0"
1061="  :  :  "
icon clock
10 |1500

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

Upvotes
25.4k 90 13 25

Hi @umer.nalla

The key difference between SFC and RFA (OMM) and EMA is that SFC returns string-based data - so even numeric fields such as BID and ASK are returned in string format.

For RFA (OMM) and EMA, the data is binary encoded - in Refinitiv Wire Format and exposed at the programming level as OMM (Open Message Model).

The format is consistent across Java and C++ versions.

So, for example, field 10 TRDPRC_5 is a Price field. In SFC it is returned as "+94.30" whereas with RFA OMM and EMA it would be returned as a Real value - which you can easily convert to Double or String using the built-in EMA functions.

icon clock
10 |1500

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

@umer.nalla As you mentioned field 10 is "+94.30" in SFC based . Could you let me know the significance of + in this value . SFC based some field contain + ex.(+20.00) but RFA based response doesn't contain +.

Hi @piyush29prajapati

This is quite an old legacy MarketFeed format we are talking about.... I have checked some old MF documents and they just mention that an optional leading + or - can be used with Price or Integer fields.

The key significance of the + / - is when used with a 0.

The positive zero (+0) represents a blank while the negative zero (-0) represents a numeric zero.

So, if a provider wanted you to blank an existing field i.e. no price or value available they would send a +0 - whereas if they wanted to represent an actual price or value of zero, then would send a -0.


@umer.nalla I have checked the SFC old format . I can see two type of value "0" and "+0" . 1661945378886.png


Do we need to consider -0 also ?

1661945378886.png (6.6 KiB)
Show more comments
Upvotes
25.4k 90 13 25

Hi @piyush29prajapati

I recommend you experiment with EMA Java (or C++ if required) to see just how easy it is to use and see the data format for yourself.

Quick Start | Refinitiv Developers

On the above page, scroll down to the EMA section, where it shows the code snippet and you can just change the localhost:14002 to one of your ADS servers (you will probably be connecting on port 8101 for SFC - just change the port to 14002 for EMA).

And change the username to the DACS id you use with SFC and the example should run., so something like:

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();
consumer  = EmaFactory.createOmmConsumer(config.host("yourads:14002").username("yourDacsID"));
ReqMsg reqMsg = EmaFactory.createReqMsg();
consumer.registerClient(reqMsg.serviceName("ELEKTRON_DD").name("EUR="), appClient);


icon clock
10 |1500

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

Upvotes
1 1 1 3

@umer.nalla I am new to refinitiv development . I am not sure field mapping from RFA to SFC data format. Could you please share the filed mapping ?


icon clock
10 |1500

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

Upvotes
25.4k 90 13 25

hi @piyush29prajapati

If you are consuming data from ELEKTRON_DD which is our consolidated real-time feed, there are no differences in the data dictionary i.e. Field names, Field IDs etc regardless of which API you use SFC, RFA or EMA - the only difference being that SFC uses string-based data and the others use Binary encoded data.

You can see the full field list in the appendix_a file which is supplied with SFC or the RDMFieldDictionary file as supplied with RFA and EMA.

The enumtype.def file provided with all APIs also contains the definitions for enumerated type fields such as Currency, ExchangeID, Trade Qualifiers etc

icon clock
10 |1500

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

Upvotes
1 1 1 3

@umer.nalla

You mean RFA FieldEntry fid="56" is equal to SFC 56=" " ?

icon clock
10 |1500

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

@umer.nalla can you please confirm this?

Hi, both APIs can use the same Data dictionary - if you are consuming the same data source - then you would be expected to use the same data dictionary.

Field 56 represents the field PCTCHNG - which is a standard Refinitiv field in the standard Refinitiv Data dictionary - as used by the Refinitiv Real-time data service (ELEKTRON_DD)

Upvotes
25.4k 90 13 25

Hi @piyush29prajapati

As mentioned previously, take a look at RFA and EMA tutorials to gauge the effort involved and coding with these APIs.

RFA Java Tutorials | Refinitiv Developers

EMA Java Tutorials | Refinitiv Developers

As before, I would advise in the strongest possible terms to avoid using RFA Java for any new development or migration work.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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