How can I retrieve the FX currency rates using RFA C#.NET code?
I am not able to find any example for retrieving FX currency rates using RFA .NET code. I have downloaded the RFA QuickStart Consumer code, but it is related to market price which is not useful for this purpose.
Best Answer
-
Hi @anil.s
The above suggests you are getting a Status Messsage response - which should provide some clues, but since this is a very basic example it does not dump the Status out to console.
A few things to check
- You have correctly populated the ExampleRFA.cfg with your connectivity parameters.
- When you build the example, the build process results in the ExampleRFA.cfg etc being copied to the Release or Debug folder (as per your selected build). Please check the appropriate build folder and ensure the ExampleRFA.cfg in the build/runtime folder has the correct connectivity parameters and not the default config file.
- Enable trace for your connection by adding the following line to the ExampleRFA.cfg (in the build/runtime folder)
\Connections\Connection_RSSL\traceMsgToFile = true
The above should generate an XML trace file in the build folder called 'Connection_RSSL_xxxx.xml' which you can upload for analysis.
You can also add some extra code to the ProcessMarketPrice method to dump the Status text out to console when it does not pass the IF statement you mentioned above
if ((respMsg.HintMask & RespMsg.HintMaskFlag.Payload) != 0)
{
....
....
}
else if ((respMsg.HintMask & RespMsg.HintMaskFlag.RespStatus) != 0)
{
RespStatus status = respMsg.RespStatus;
Console.WriteLine("Status:" + status.StatusText);
}If after confirming your build folder has the correctly populated ExampleRFA.cfg file, you continue to have problems, then please upload the console output and the trace xml file.
0
Answers
-
Hi @anil.s
If you know the RIC code for the currency rate, you can use that instead of the sample RIC code that is being used in the QuickStart Consumer code.
So, for example if the Quickstart example is using "TRI.N" for the RIC, you could replace this with "EUR=" or "GBP=" for Euro or Sterling related prices.
You can Consume the "CURRENCIES" RIC to get the Currencies Speed Guide page, which lists the codes for other Currency related pages. e.g. "G7CCY/1" details the guide pages for G7 Currencies. The pages show the RIC codes needed to drill down - e.g. "EUR/1" is Euro guide page. From there you can see the various Euro related RICs e.g. EUR="
You can use the convenient GUI viewing tool SpeedGuide to view the above pages.
1 -
Hi @anil.s
The term “Market Price” is actually used to denote information which contains trades and quotes. You can retrieve FX rate from Market Price.
In order to retrieve FX rate, you have to specify FX rate's RIC as the item name.
Some sample FX rate RICs are
JPY=
GBP=
EUR=The above RICs are USD cross rate. For non-USD cross rates, you have to use "<Currency Code A><Currency Code B>=". For example:
GBPJPY=
EURCAD=(Try swapping A - B currency if the request return not found).
1 -
If you need help in finding out the RIC for FX instrument, try the RIC Search tool available in the developers portal in the Home page > under Resources. Type in the name of currency and select FX and Money category to restrict results.
The last entry in the table is a RIC, which can be used in the RFA Quickstart consumer example.
1 -
I downloaded SpeedGuide and executed it with my server configuration. localhost:14002. The server is running in the background, however the connection failed with message "Received ChannelDownReconnecting event on channel Channel. Error initializing channel errorid=-1 text=Connection refused"
0 -
Update: When my code tries to connect with EZD service (running in the background), it gives error
Static: (Severity) Warning: RSSL Channel closing on connection "Default::Connection_RSSL localhost:14002" due to "channel disconnect"
0 -
Here is the log generated after using SpeedGuide. This log entries are taken from ezd.txt located at EZD server installation location.
<LLPC0312.1.ezd: Error: Tue Jan 30 13:32:30.439557 2018>
SIPC Server initialization failed on port 14002: <..\..\..\src\ipc\sipcsrvr.c:1062> sipcBindSocket() failed (10048)
<END>< LLPC0312.1.ezd: Error: Tue Jan 30 13:32:30.439588 2018>
Unable to start Sink Sipc Server.0 -
Now I am able to conenct with EZD server, but my code execution does not pass the following IF condition. It comes out of the IF block.
if ((respMsg.HintMask & RespMsg.HintMaskFlag.Payload) != 0)
I have provided attribute name as "GBPINR=R" and using service "ELEKTRON_DD"
The HintMask coming as 10, Payload coming as 64
0 -
I am able to connect with EZD now. There was URL access issue through proxy, which I sorted out to make it work
0 -
I am able to connect with EZD now. There was URL access issue through proxy, which I sorted out to make it work
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛