I am following the "ChainStepByStepExample" example from github link
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?
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.
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
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:
Hope this helps
I am following the example from Marketprice example from the link
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
But Example step 11 works good with "EURAB6EIRS="
Can somebody let me know the reason? I need to get ASK and BID for "EURAB6EIRS="