question

Upvotes
Accepted
401 15 18 33

Publishing 0 value to Reuters RIC

Can someone please tell me how to publish a zero value to Reuters RIC using RFA java API? Appreciate if you can give me the code snippet.

I understand we are supposed to publish as -0 for Reuters to interpret 0

treprfarfa-api
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.

1 Answer

Upvote
Accepted
791 9 7 14

You've posted this in group "RFA + Market Data Interfaces" so I'm assuming that is what you are using. The MarketData interfaces are considered legacy. (yeah, I know, the name "market data interfaces" tricks you into believing that is what you must use). Anyway, in this answer I'll assume that you are indeed doing that.

In this legacy world data would be published in either Marketfeed or SASS3 format. You are right that with respect to Marketfeed the convention has always been that in order for a value to be interpreted by the end consumer as a true zero it must be published as "-0", i.e. with a minus prefix. All other forms of zero ("0.0", "+0.0", "0", etc) will be (should be) interpreted by the end consumer as a blank value.

See, the things to realize is that Marketfeed is really a text format. Everything travels the wire as text regardless of field type. So what you publish into a field of type PRICE is really just text. Basically as a publisher you could put any nonsense in there if you like.. but the consumer will of try to interpret the value as a decimal number - and fail if you've put rubbish into the field.

If you insist to use the legacy interfaces then you can find example of a publisher in Legacy\Examples\com\reuters\rfa\legacyexample\session\mdpub. Also have a look at how Legacy\Examples\com\reuters\rfa\legacyexample\utility\MFEncoder.java works. For example to publish a true zero you would do something like:

_mfEncoder.appendField("22", "-0.0"); // publish true zero into BID field

or to publish what the consumer should interpret as a blank:

_mfEncoder.appendField("22", "+0.0"); // publish blank into BID field

The same thing applies if you are doing contribution rather than publishing. Same principle.

.. but at the end of the day you are much better off by not using these legacy interfaces and instead doing an OMM Provider application.

In OMM world there's native support for blank values whereas in Marketfeed it is clearly something that was "invented" as an after-thought. Also in OMM you have strongly typed fields as opposed to Marketfeed's everything-is-really-just-text.

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