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:45 PM · eikoneikon-data-apipython

Getting Error message - ValueError: too many values to unpack (expected 2)

df, err = ek.get_timeseries(["AUD="], start_date='2022-05-12T15:00:00', end_date='2022-05-12T15:30:00', interval='tick',
                            fields=['TIMESTAMP', 'VALUE', 'HIGH', 'LOW', 'OPEN', 'CLOSE'])

#df['Mid']=df.mean(axis=1)
print(tabulate(df, headers='keys', tablefmt='fancy_grid'))

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.

6 Replies

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

Hi @Atul.Sanwal,

The get_timeseries API call does not return a tupple like get_data call. Please use following syntax:

df = ek.get_timeseries("AUD=", start_date='2022-05-12T15:00:00', end_date='2022-05-12T15:30:00', interval='tick')
display(df)


Comment
Atul.Sanwal

People who like this

1 Show 2 · 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 13 at 03:53 AM 0
Share

now i am getting the following error : ValueError: not enough values to unpack (expected 2, got 1)

avatar image
Atul.Sanwal · May 13 at 03:55 AM 0
Share
it actually worked after i changed df, err= ek.get_timeseries to df =ek.get_timeseries
avatar image
Answer by Atul.Sanwal · May 13 at 03:57 AM

just one more question, is there a way to get fx mid using timeseries function or bid/ask 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.

avatar image
Answer by Atul.Sanwal · May 13 at 03:58 AM
df = ek.get_timeseries("JPY=", 'TR.ASKPRICE', 'TR.BIDPRICE',start_date= '2022-05-12T15:00:00',end_date= '2022-05-12T15:10:00', interval='tick')
df['Mid']=df.mean(axis=1)
print(tabulate(df, headers='keys', tablefmt='fancy_grid'))
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 raksina.samasiri · May 13 at 07:19 AM

hi @Atul.Sanwal ,

Those fields aren't available in the get_timeseries request

1652425798643.png

To get the bid and ask values of JPY=, I would recommend you look at the newer RD Library for Python - which is currently in Beta and due for release in the coming months.

It should have much-improved error/session handling than RDP Library once it is released and the data available in Eikon Data API is also available there.

It will also have fuller documentation - I have been advised by the RD Library team that they are awaiting the completion of the documentation to confirm the release date.

To try using this and discovering RD Library, you can open its code example in the Codebook app on the Eikon desktop and check in the directory below

  • __Examples__/01. Data Retrieval & Discovery/01.01. Refinitiv Data Library/EX_01_01_02__Access__Get_History.ipynb1652426304036.png

Please let me know in case you have any questions


1652425798643.png (36.3 KiB)
1652426304036.png (88.2 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 Atul.Sanwal · May 13 at 03:20 PM

actually i am trying to do a fx comparison between our broker rates vs refiniiv's rates, was wondering If i get JPY = 128.48 asof 13th May at London 4pm, how will i get the rate for the same timezone from refinitiv, also, how many Counts it will deliver, the objective is to compare like for like

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 Atul.Sanwal · May 13 at 03:39 PM
rd.set_app_key('cccb21291cc14760a9174f5be2abb75478e0a81')

also i am getting error in this line 
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 >
11 People are following this question.

Related Questions

Company trees don't match in Eikon online tool and the Eikon Proxy API

Download API Proxy Python for Windows.

How to get all investors for a list of stocks, historically with the python API

What other parameters can be used with the statement pertaining to Corporate Actions data such as Stock Splits?

Trying to fetch Close Bid Price for CMO tranche from Python

  • 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