For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 4 7

wrong ask and bid sizes shown on Reuters Eikon published via TRCC

we are using TRCC to contribute our quotes to Reuters. But we've found the ask/bid size shown the quote page on Eikon is 1/10 of what we want to publish. For example, if ask size is 10 for the input, the quote page shows 1.

Here's my code to set the ask and bid size.

FieldList nestedFieldList = EmaFactory.createFieldList();nestedFieldList.add(EmaFactory.createFieldEntry().realFromDouble(393, bid, OmmReal.MagnitudeType.EXPONENT_NEG_1));nestedFieldList.add(EmaFactory.createFieldEntry().realFromDouble(275, ask, OmmReal.MagnitudeType.EXPONENT_NEG_1));nestedFieldList.add(EmaFactory.createFieldEntry().real(791, bidSize*10,OmmReal.MagnitudeType.EXPONENT_NEG_1));nestedFieldList.add(EmaFactory.createFieldEntry().real(985, askSize*10,OmmReal.MagnitudeType.EXPONENT_NEG_1));
elektronrefinitiv-realtimeelektron-sdkjavarcc-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.

Upvotes
Accepted
78.2k 246 52 72

OMMReal is a structure that represents decimals or fractional values. It preserves the precision of numeric values by separating the numeric value from any decimal point or fractional denominator.

Converting an OMMReal to a double or float is typically done to perform calculations or display data after receiving it. The following shows the conversion of OMMReal to Double when the magnitude type of OMMReal is EXPONENT_NEG_1 (10^-1).

Eikon converts OMMReal to Double and then displays the double value.

If you want to preserve the value of mantissa (long), you can use the EXPONENT_0 magnitude type.

createFieldEntry().real(791, bidSize*10,OmmReal.MagnitudeType.EXPONENT_0))


neg-1.jpg (39.5 KiB)
exp-0.jpg (39.2 KiB)
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
32.2k 40 11 19

Hello @pinzhang.wang,

It appears that you are adding fields to the nested field list as OmmReal.MagnitudeType of "EXPONENT_NEG_1", is this what you mean to include? Meaning "1 over value in power"? Or is what you would like to specify OmmReal.MagnitudeType.EXPONENT_POS_1, meaning "include value as is"?

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.