Wrong ask size shown on Reuters Eikon while publishing using TRCC

when I use the sample code from Reuters to publish ask price, bid price, ask size and bid size to a RIC. The ask and bid size shown on my Reuters Eikon Quote pages are always wrong. For example. if I set the ask size to be 1, the price shown on the quote page is 0.1. The code section I used to set ask size and bid size are following.

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,OmmReal.MagnitudeType.EXPONENT_NEG_1));
nestedFieldList.add(EmaFactory.createFieldEntry().real(985, askSize,OmmReal.MagnitudeType.EXPONENT_NEG_1));

Best Answer

  • @pinzhang.wang

    The question has been answered on this thread.

    The createFieldEntry().real(int fieldId, long mantissa, int magnitudeType) is used to create OMMReal from mantissa and mangitudeType. You can use EXPONENT_0 to preserve a value of mantissa.

    The createFieldEntry.realFromDouble(int fieldId, double value, int magnitudeType) is used to convert double to OmmReal and uses the magnitudeType for the conversion.