question

Upvotes
Accepted
27 8 12 13

ChainStepByStepExample gives only names but require swap rates

Hi

I am following the "ChainStepByStepExample" example from github link

https://github.com/Refinitiv-API-Samples/Example.EMA.Java.ValueAddObjectsForEMA

But this example only gives only names of all elements of the chain. I want streaming of real time EUR BID,ASK and mid swap rates in real time for all the tenors that are available along with the name of the contributor and timestamp, from Elektron using RIC EURAB6EIRS=



Is there any example code, that can fetch me this kind of data?

Thanks

Dhruv


elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apiswaps
1597783309668.png (261.7 KiB)
icon clock
10 |1500

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

Upvote
Accepted
32.2k 40 11 19

Hello @dhruv.arora,

EURAB6EIRS= is a chain RIC, rather then a single level RIC. So it will not have BID and and ASK directly, the constituents of the chain will have BID and ASK fields.

In order to process that programmatically, you will need to do a two-step:

1. Subscribe to chain RIC EURAB6EIRS= and obtain a list of RICs within the chain. The articles with code that I have mentioned above should be of help.

2. Take the list of RICs obtained in step 1 and subscribe all those RICs (for example, in chain EURAB6EIRS= the first RIC is EURAB6E1Y=, once you subscribe this constituent RIC, BID and ASK will be part of that stream.

icon clock
10 |1500

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

Upvotes
32.2k 40 11 19

Hello @dhruv.arora,

The concept of the chain is designed to convey a united set of instruments, RICs. The set is expected to update, and by requesting and parsing "the chain" one always has the list of RICs that is up-to-date,

Have you had a chance to read our articles on the subject

Simple Chain objects for EMA - Part 1

and

Simple Chain objects for EMA - Part 2

I think it will be helpful for understanding of the structure and intention.

Eikon, consequent to the retrieval of the list of instrument, behind the scene, subscribes each instrument and lays out the required subset of fields.

A consumer examples from EMA SDK, such as EMA MarketPrice Streaming Example 100 or for ERT, EMA MarketPrice SessionManagement 113 will contain the code to subscribe a RIC.

Example 370, Market Price Batch, shows how to subscribe to a batch of instruments.

Once you have a list of RICs as your result from chain retrieval, any of this code can be used to subscribe an instrument or a group of instruments.

Also ChainStepByStepExample project includes MarketPriceStepByStepExample code to do the same, to subscribe an instrument,

And the detailed description of the steps required can be found in articles:

A simple MarketPrice object for EMA - Part 1

and

A simple MarketPrice object for EMA - Part 2

Hope this helps

icon clock
10 |1500

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

Upvotes
27 8 12 13

Hi

I am following the example from Marketprice example from the link

https://github.com/Refinitiv-API-Samples/Example.EMA.Java.ValueAddObjectsForEMA/tree/c102e99e24467c9a5929fa2548f1b9367c3e6173/src/com/thomsonreuters/platformservices/elektron/objects/examples/marketprice


In Example step 12 of the MarketPriceStepByStepExample class, when I give the RIC name as "EURAB6EIRS=" instead of "EUR=", it throws the following error:

.............................................................................

. 12/17 - openAMarketPrice_And_DisplayCachedFieldsEvery2Seconds_SynchronousMode_UserDispatch()

.............................................................................

. This step demonstrates that even if you built the MarkePrice with the

. synchronous mode activated, you continue to benefit from the automatic

. update mechanism of the cached image.

. For the purpose of this demonstration, we build a MarketPrice with the

. SynchronousMode activated and, as soon as the open() method returns, we

. display the DSPLY_NAME,the BID and the ASK fields every 2 seconds.

. It is important to note that the OmmConsumer object used for this step

. has been built using the USER_DISPATCH EMA operation model. For this reason

. the MarketPrice object is built with the synchronous mode activated but

. also with the autodispatch parameter set to true. Thanks to this parameter

. the open method of the MarketPrice will dispatch EMA events until an image

. or a status is received from the platform.

<<< Press <Enter> to continue...

>>> Opening <EURAB6EIRS=>

>>> Display fields every 2 seconds just after open() returned:

>>> Fields at 22:04:36

DSPLY_NAME(3) = EUR AB6E IRS

Exception in thread "main" java.lang.NullPointerException

at MarketPriceASKBID.MarketPriceStepByStepExample.print(MarketPriceStepByStepExample.java:1341)

at MarketPriceASKBID.MarketPriceStepByStepExample.openAMarketPrice_And_DisplayCachedFieldsEvery2Seconds_SynchronousMode_UserDispatch(MarketPriceStepByStepExample.java:679)

at MarketPriceASKBID.MarketPriceStepByStepExample.main(MarketPriceStepByStepExample.java:103)


But Example step 11 works good with "EURAB6EIRS="

Can somebody let me know the reason? I need to get ASK and BID for "EURAB6EIRS="

Thanks

Dhruv

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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