Posting String data in fields

Hello,

nestedFieldList.add(EmaFactory.createFieldEntry().real(25, 99l, OmmReal.MagnitudeType.EXPONENT_NEG_1));

I have the above code when populating my fieldlist to post some data to Refinitiv, i am able to correctly post and see my updates when this data is posted.

However In the case that I would like to post a String value to the field instead, using the code sample below,

nestedFieldList.add(EmaFactory.createFieldEntry().utf8(25, "Foo"));

I get a Nack saying this is invalid content, does the EMA api support posting String to fields ? If so what is the correct way of achieving this.

Best Answer

  • umer.nalla
    Answer ✓

    Hi @marc.labuhn

    Field 25 Definition is

    ASK "ASK" 25 ASK_1 PRICE 17 REAL64 7

    It is a REAL64 field - therefore you cannot post a string to a numeric field.

    Please refer to the RDMFieldDictionary (and enumtype.def) file in the Java\Etc folder of your RTSDK installation for details of the fields and their definitions