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 tanaj · Nov 29, 2019 at 11:00 AM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonwebsockets

Proper parameters for retrieving bid ask information via Eikon Data API via Python.

Hello,
I would like to obtain tick data for equities. The example here is 'ADVANC.BK'. However, the function (1) gives all 'nan' responses. Since function (2) works well, I doubt the parameters in 'fields' are specified incorrectly. Please help correct the function (1) where they are needed.

(1) ek.get_timeseries(rics=['ADVANC.BK'],fields=['TR.PRICE','TR.BIDSIZE', 'TR.ASKPRICE', 'TR.BIDSIZE','TR.ASKSIZE'], start_date = "2019-09-24T06:00:00", end_date = "2019-09-30T09:30:00",interval="daily")

(2) ek.get_timeseries(rics=['CNYQM7R1Y=TPSC'],fields = ['Value'],start_date = "2019-09-24T06:00:00", end_date = "2019-09-30T09:30:00",interval="tick")

1575025038920.png (17.5 KiB)
1575025085220.png (25.1 KiB)

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.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by marcin.bunkowski · Dec 03, 2019 at 08:29 AM

Hi @tanaj

Try this:

ts=ek.get_timeseries("ADVANC.BK",['Bid','Ask','Bidsize','Asksize','Count','Trdprc_1'], start_date = "2019-12-01T06:00:00", end_date = "'2019-12-03T21:00:00", interval="tas")
ts.tail()



ahs.jpg (91.9 KiB)
Comment

People who like this

0 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
tanaj · Dec 03, 2019 at 09:41 AM 0
Share

Thank you Marcin !

avatar image
m.rousseau · Dec 20, 2019 at 10:42 AM 0
Share

Hello Marcin,

I copy/paste your code but result is totally different (screenshot attached)

I'm using API v1.0.2 (18 December)

Looks like timeseries service still provides only a limited fields. Is it planned to be able to use others fields like Bid,Ask,... I know it's possible with .NET API but I really don't want to use it. Python is more convenient.

Thanks

Marc

test.png

test.png (235.4 KiB)
avatar image
REFINITIV
Answer by chavalit-jintamalit · Nov 29, 2019 at 11:35 AM

Hi @tanaj

Please refer to the API document at https://docs-developers.refinitiv.com/1575026507514/14684/book/en/eikon/index.html#get_timeseries

get_timeseries supports only 'TIMESTAMP', 'VALUE', 'VOLUME', 'HIGH', 'LOW', 'OPEN', 'CLOSE', 'COUNT' fields !


So if you want to retrieve TR.xxx fields, you have to use get_data()

Since I am not sure what data you try to retrieve(bid ask bidsize asksize in historical? Not so sure what does it mean), here is an example for both get_timeseries and get_data:

And this is for interval = tick (I use .tail() because there are a lot of records)

For get_data, you can use Data Item Browser to explore what fields(with parameters) are available or contect Refinitiv Content Helpdesk.




ahs.png (56.2 KiB)
ahs3.png (14.1 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 tanaj · Dec 03, 2019 at 02:32 AM

Dear @chavalit.jintamalit, I apologize for not being exact with the data specification. The data I am trying to retrieve are 1) Bid price 2) Ask price 3) Bid size 4) Ask size 5) Trading Volume 6) Price of last trade. All are with the frequency of 'tick'. Data range is from 24-09-2019 to 30-09-2019. Put it simply, I would like to get the data in the picture below with two additional columns for bid size and ask size via Python. (ADVANC.BK >> Price & Charts >> Time & Sales). The function (1) (in the original question) parameters should be changed from "interval='daily'" to "interval="'tick'". Please help me correct the function (1) in order to retrieve such data.


1575339525615.png (97.3 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
REFINITIV
Answer by chavalit-jintamalit · Dec 03, 2019 at 04:48 AM

Hi @tanaj

The data you are looking for, they cannot be retrieved using Python API.


You can refer to API document at https://docs-developers.refinitiv.com/1575347810533/14684/book/en/eikon/index.html#get_timeseries

Check the fields and interval that the API is currently supporting.


There is another API, .NET API which allow you to retrieve this data.

Please visit https://developers.refinitiv.com/eikon-apis/net-apis-use-custom-applications

Then go to Download >> Usage Example Time series API
Then modify the TimeSeriesRequestExample following this sample code:


ahs2.png (23.0 KiB)
ahs1.png (498.8 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
tanaj · Dec 03, 2019 at 09:41 AM 0
Share

Thank you Chavalit. I wil definitely try .NET API.

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

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

Retrieve Commodity Flows data using Python API

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

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

When will the python real-time API be available ?

  • 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