Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by iscas.wang · Oct 13, 2020 at 03:26 AM · ematrep api

mock Refresh/UpdateMsg ?

Is there any possible way that I can construct my own Refresh or Update Msg as callback argument so that I can construct my data for test, without waiting market open for real quotes from ema sdk ?

I tried construct FieldList like this:

emaaccess::FieldList fl;

fl.addInt(FID_US_QUOTIM_MS, 3 * 3600);
fl.addUInt(FID_US_OPINT_1, 2000);
fl.complete();

But when iterate the field entries using forth() method, program will be terminated with signal 11 which generates coredump.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

5 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Oct 13, 2020 at 09:11 AM

Hi @wangfugen

The recommended way to test with mock data matching your specific FID requirement etc is to modify one of the IProvider Examples that comes with EMA.

You could then run the IProvider and the consumer on the same machine and set the Consumer to connect to localhost. This way the Consumer will connect to the IProvider, send the data request to the Provider - which will then publish the data as per your modifications.

The most basic IProvider example is 100__MarketPrice__Streaming, and a slightly more advanced one is 200__MarketPrice__Streaming

You can off course run the IProvider on a different PC if required and configured the Consumer accordingly.

I recommend reading this article by my colleague for a good high-level explanation of publishing custom data - the code is Java-based, however, the concepts are the same.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by iscas.wang · Oct 13, 2020 at 12:22 PM

That's exactly what I needed, Many thanks. @umer.nalla

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by iscas.wang · Oct 16, 2020 at 10:25 AM

@umer.nalla Hi, I tried the method you mentioned above by compiling example 100__MarketPrice__Streaming and run both IProv100 and my application on the same host. I also modified EmaConfig Channel_2's Host & Port settings to point to IProv100.

By adding some stdout logging in IProv100, I found when I start my application, MMT_LOGIN message is successfully processed. But I could not see more MMT_MARKET_PRICE request to be processed. I checked the log from my application, it has such output from onStatusMsg:

onStatusMsg: [2020-10-16 19:52:37 744970][6093:140521547265792]
Service Name: ELEKTRON_DD
Item State: Closed / Ok / None / 'Service name of 'ELEKTRON_DD' is not found.'


ELEKTRON_DD is the service name I originally request normal feed. So How to resove this problem ? I found no place where IProv100 could configure its supported service name. Thanks.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by umer.nalla · Oct 16, 2020 at 10:49 AM

Hi @wangfugen

The easiest solution would be to change your consumer to request data from the service 'DIRECT_FEED'

Or if you prefer you can change your EMAConfig.xml (or override the default value) that is being used by the IProvider to publish data on ELEKTRON_DD. This will require to amend your EMAConfig.xml (or if you are not using one, then copy the default one that comes with ElektronSDK).

If you refer to the default EMAConfig.xml you will note the default IProvider config is

<DefaultIProvider value="Provider_1"/>

and the above config refers to the source directory

<Directory value="Directory_2"/>

If you then refer to Directory_2 config you will note that the service name is 'DIRECT_FEED' which you can change to ELEKTRON_DD if required:

All the above is assuming the EMAConfig.xml is the default one and you have not already made changes to it.

Note : even if you are not presently using an EMAConfig.xml file, then EMA will use default values for all the parameters as detailed in EMACPP_ConfigGuide.pdf that is included in the ElektronSDK. To override these you can either supply an EMAConfig.xml in the working directory of your application OR use programmatic config within your code. Programmatic config is briefly covered in my EMA Config article and in more detail in the EMACPP_ConfigGuide.pdf




1602845041500.png (13.1 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by iscas.wang · Oct 16, 2020 at 11:03 AM

@umer.nalla I copied one EmaConfig.xml with IProv100, now my application can receive Refresh & UpdateMsg normally. Many thanks again.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

EMA Límit API Subscribe Rics

TREP API connectivity failover issues

What values needs to be set for RECORDTYPE(FID: 259) for various asset classes

Why the background loaded dictionaries are not public accessible in EMA

EMA - How do I use batch reissue and close

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges