Correct Domain type & Field Id for Bid Size/Ask Size/Fair Value or other static data

Options
gil.law
gil.law Newcomer

We can post bid/ask successfully. We still have
difficulty to post these data fields after checking the docs in developer
portal:

Bid Size

Ask Size

Fair Value

Here is our code snippet:

######################### Java code
snippet #########################

FieldEntry bid =
EmaFactory.createFieldEntry().real(22, 123,
OmmReal.MagnitudeType.EXPONENT_NEG_2);


FieldEntry bidSize = EmaFactory.createFieldEntry().real(30, 1000,
OmmReal.MagnitudeType.EXPONENT_0);


FieldEntry ask = EmaFactory.createFieldEntry().real(25, 125,
OmmReal.MagnitudeType.EXPONENT_NEG_2);


FieldEntry askSize = EmaFactory.createFieldEntry().real(31, 1000,
OmmReal.MagnitudeType.EXPONENT_0);


FieldEntry fairValue =
EmaFactory.createFieldEntry().real(3258, 127,
OmmReal.MagnitudeType.EXPONENT_NEG_2);


FieldList fieldList = EmaFactory.createFieldList();


fieldList.add(bid);


fieldList.add(bidSize);


fieldList.add(ask);


fieldList.add(askSize);


fieldList.add(fairValue);


UpdateMsg updateMsg = EmaFactory.createUpdateMsg()


.streamId(postStreamID)

//
.name("APILOG01=TEST")


.name("CH0389071389=LUKB")

//
.name("CH0389070308=LUKB")


.payload(fieldList);


PostMsg postMsg = EmaFactory.createPostMsg()


.streamId(postStreamID)


.postId(postID)


.domainType(EmaRdm.MMT_MARKET_PRICE)


.solicitAck(true)


.payload(updateMsg)


.complete(true);


ommConsumer.submit(postMsg, subStreamHandle);

######################### Java code
snippet #########################

We get this return code:

######################### Return from
TR #########################

Received AckMsg. Item Handle: 3 Closure:
1

Ack Id: 1

Nack Code: DeniedBySource

Text: No such field

######################### Return from
TR #########################

My question is: May I know if we are using the
correct (1) Domain type & (2) Field Id?

Apprecaite your help!

Best Answer

  • Hello @gil.law

    Based on the previous question that you are trying to post data to TRCC directly using EMA Java, I suggest you contact the person who have given you TRCC info(server, service) and RICs. You should confirm him if the RIC(CH0389071389=LUKB) is correct and the RIC contains field id 22,30,25,31 and 3258 which you are trying to publish or not. According to No such field error, it seems that the RIC does not contain one or more field(s) you are trying to post data to TRCC.

    As far as I know, TRCC currently supports Market Price domain which you use. Hence, the problem should not cause from the domain type.

Answers