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.
Best Answer
-
Hi @iscas.wang
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.
0
Answers
-
That's exactly what I needed, Many thanks. @umer.nallaumer.nalla
0 -
@umer.nallaumer.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.
0 -
Hi @iscas.wang
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
0 -
@umer.nalla I copied one EmaConfig.xml with IProv100, now my application can receive Refresh & UpdateMsg normally. Many thanks again.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 630 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛