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 /

For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by anil.s · Jan 29, 2018 at 01:26 AM · elektronrefinitiv-realtimeelektron-sdkrfaforex

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.

People who like this

0 Show 2
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.

avatar image
anil.s · Jan 30, 2018 at 02:54 AM 0
Share

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"

avatar image
anil.s · Feb 02, 2018 at 01:17 AM 0
Share

I am able to connect with EZD now. There was URL access issue through proxy, which I sorted out to make it work

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Feb 02, 2018 at 05:59 AM

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

  1. You have correctly populated the ExampleRFA.cfg with your connectivity parameters.
  2. 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.
  3. 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.

Comment

People who like this

0 Show 1 · 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
anil.s · Feb 05, 2018 at 12:16 AM 0
Share

Thanks @Umar

I filled in the missing port numbers and hostname values in my cfg file and then it started workig. After running the example, I started getting the currency price in console.

avatar image
REFINITIV
Answer by umer.nalla · Jan 29, 2018 at 04:40 AM

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.

Comment
anil.s

People who like this

1 Show 3 · 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
anil.s · Jan 30, 2018 at 02:48 AM 0
Share

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"

avatar image
anil.s · Jan 30, 2018 at 03:21 AM 0
Share

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.

avatar image
anil.s · Feb 02, 2018 at 01:17 AM 0
Share

I am able to connect with EZD now. There was URL access issue through proxy, which I sorted out to make it work

avatar image
REFINITIV
Answer by warat.boonyanit · Jan 29, 2018 at 04:58 AM

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).

Comment
anil.s

People who like this

1 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 Gurpreet · Jan 29, 2018 at 10:19 AM

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.

Comment
anil.s

People who like this

1 Show 1 · 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
anil.s · Feb 02, 2018 at 01:15 AM 0
Share

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

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 >
8 People are following this question.

Related Questions

RFA API , How to proceed "Blank Value" on Equity FID 22 update

Need sample application with RFA.NET to get Market Data/TREP via EZD?

How can I know which legs of a strategy are being bought and sold?

Can Elektron be installed on separate machine than RFA.net application

On what scenarios one should Prefer ETA over EMA?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • 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
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges