question

Upvotes
Accepted
37 1 2 8

Elektron Contribution - Posting chain data and XML

I have been trying out the Contributions Tutorial examples and have managed to post values for my Test RIC.

I do have a couple questions though:


  1. One of the available Add functions (addXml) is using XML – do you have any examples of XMLs that I can try please?
  2. If I have RICs (from a chain RIC), e.g.

RIC

Name

Value

TESTRICMK0

TESTRIC MAY20

100.65

TESTRICMN0

TESTRIC JUL20

10.23

TESTRICMU0

TESTRIC SEP20

102.34

What is the best way for me to send those values through? Should I use an XML structure and AddXML function or one by one using AddFloat function or some other method?


Many thanks

elektronrefinitiv-realtimeelektron-sdk
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
20.3k 73 10 20

Hi @emir.subasic

Each RIC will need to be updating in a single PostMsg - as you need to set each PostMsgs attribute individually e.g. RIC code, streamId etc.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks for confirming

Upvotes
13k 32 12 18

Hi @emir.subasic, Can you please elaborate which Contribution tutorial you are referring to? Are you using the TR Contribution Channel?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
37 1 2 8

Hi,

Yes, using the TR Contribution Channel.

At the moment I am doing something like:

_pOmmConsumer->submit(PostMsg()

.streamId(_postStreamID)

.postId(_postID).domainType(MMT_MARKET_PRICE)

.solicitAck(true).complete()

.payload(UpdateMsg().streamId(_postStreamID)

.name(RIC)

.payload(FieldList()

.addFloat(fieldId, value)

.complete()))

.complete(),

_subStreamHandle);

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

You can see the SDK documentation on how to use the XML add feature:

OmmXml xml;
xml.set( "<xml tag>this is xml data</xml tag>" );
fList.addXml( 123, xml ).complete();
XML can be added to FID's, which can carry that data. In your sample, you will have to use add float methods only.
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
37 1 2 8

Hi,

I have tried to find it and checked EMACPP_DevGuide.pdf document. Unfortunately, I don't see any XML examples in it. Can you point me to the right document please?

Does the XML need to conform to a predefined schema?


In my initial example, I have the following 3 RICs with 3 price values (PRIMACT_1 field) and 3 CRT_MNTH field values.

Can you please advise what is the best way for me to send all these values through and if possible a code illustration?


TESTRICMK0 MAY20 100.65

TESTRICMN0 JUL20 104.23

TESTRICMU0 SEP20 102.34


Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

Hi @emir.subasic

I could be wrong but I am not aware that you can use Xml to contribute or publish data -either to TRCC or to TREP.
My understanding was that the XML functionality is so you can transport Xml Payload between providers and consumers who want to use XML to exchange data - just like you may send Opaque data or AnsiPage data etc

As far as I am aware If you want to contribute data you need to use the conventional FieldList payload with individual fields as illustrated in the TRCC tutorial Posting data to TR Contribution Channel

.payload( FieldList()                     
    .addReal(22, _BID-1, OmmReal::ExponentNeg2Enum)                     
   .addReal(25, _ASK-1, OmmReal::ExponentNeg2Enum) 

If my colleague Gurpreet has more up-to date information I am sure he will post here.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
37 1 2 8

OK. So based on my requirement with the 3 RICs, I assume I would need to do 3 posts of payloads?

Is there a way to combine the payload for the 3 RICs it into a single post?

Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

Hi @emir.subasic,

The XML is the payload type, and it can not be carried in the FID which has data type of float or long etc. An XML schema will not automatically translate to updating three float fields in the contribution system.


Like Umer mentioned, you will need to submit three update payloads, one for each instrument, each one having its own unique POST ID. Your application also has to keep track of the ACK/NAK messages for each instrument, to see that your contributions are getting accepted by the system and you are not hitting any update rate limit.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea