How can i publish blank value to BID/ASK?

I would like what value/method to create a blank value on BID/ASK fields on ETA? Thanks.

Best Answer

  • Hi @Chun Kit Wan

    You did not mention if you are using ETA Java or ETA C - but I can see you asked Java question previously...

    I found an example of encoding a blank field in one of our example source code files Java\Eta\Applications\Examples\src\main\java\com\refinitiv\eta\examples\codec\FieldListCodec.java

    /* Field Entry: encode entry as a blank Real primitive type */
    /* populate & encode field entry with fieldId & dataType information for this field */
    /* need to ensure that FieldEntry is appropriatley cleared */
    /* clearing will ensure that encodedData is properly emptied */

    fieldEntry.clear();
    fieldEntry.fieldId(22); /* BID field */
    fieldEntry.dataType(DataTypes.REAL);
    /* void* parameter is passed in as null & encodedData is empty due to clearing */
    if ((retVal = fieldEntry.encodeBlank(encIter)) < CodecReturnCodes.SUCCESS)
    {
    System.out.printf("Error %s (%d) encountered with EncodeFieldEntry.  Error Text: %s\n",CodecReturnCodes.toString(retVal), retVal, CodecReturnCodes.info(retVal)); 
         return retVal;
    }
    System.out.printf("\t\tFID %d  Encoded Real as blank.\n", fieldEntry.fieldId());


    You will also find a similar snippet using encodeBlank() in section 11.3.1.5 Encoding Example of the ETAJ_DevGuide.pdf which is supplied with the Elektron SDK Java file.

    If you are using ETA C, then a similar snippet can be found in the TransportAPI_C_DevGuide.pdf section 11.3.1.6 Encoding Example

Answers