Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by Atul.Sanwal · May 12 at 08:09 PM · eikoneikon-data-apipython api

How to get fx rate for a particular snaptime and date (london timezone)

Hi All, i am currently using the below piece of code to get fx rate using eikon API but it gives me the latest fx rate for the given ric, say I want to know fx rate for a specific timezone and date, how can I retrieve it ?


ek.set_app_key('************')
df, err = ek.get_data(
   ['JPY='],['TR.RIC','BID','ASK']
)
df['Mid']=df.mean(axis=1)
print(df)

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.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · May 12 at 09:21 PM

You can look into get_timeseries API call to get granular timeseries data. The bar data can be rolled up into minutes using:

df = ek.get_timeseries("JPY=", count = 5, start_date = "2022-05-12T15:00:00", interval="minute")

other option for minutes parameter are:

'tick', 'minute', 'hour', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'


Comment
Jirapongse

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 · May 12 at 08:24 PM

Hi @Atul.Sanwal,

The Eikon API only provides data in UTC. For other timezones, you will have to convert the local timezone into UTC before requesting the data.

To get a data point at a particular point-in-time, use the fields which allow history. This can be seen from the Data Item Browser (DIB).

Here is an example:

df, err = ek.get_data(['JPY='],['TR.ASKPRICE', 'TR.BIDPRICE', 'TR.ASKPRICE.Timestamp'], {'SDate': '2022-05-01'})
display(df)

Response:

1652387066769.png


1652387066769.png (6.9 KiB)
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
Atul.Sanwal · May 12 at 08:44 PM 0
Share
Hi Gurpreet, Thanks for the help, sorry a bit confused how can i search the fx rate based on UTC timezone, where do i need to input the timestamp ? say i want to see UTC 15:00:00 for 12th May
avatar image
Answer by Atul.Sanwal · May 12 at 08:49 PM
df, err = ek.get_data(['JPY='],['TR.ASKPRICE', 'TR.BIDPRICE', 'TR.ASKPRICE.Timestamp'], {'SDate': '2022-05-12T15:00:00'})

i tried the above but getting NAN values
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 >
13 People are following this question.

Related Questions

Fundamental data and get_timeseries

Eikon Data API via Python URL blocked

Obtain TR.CommonName and TR.RIC given a list of companies

How to get block trade for NYMEX WTI 1 MONTH CALENDER SPREAD OPTION CHAIN when occurs via python api?

HIGH values not available anymore for US3MINV=RR

  • 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
  • FX Venues
    • FX Trading – RFQ Maker
  • 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
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges