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")
Best Answer
-
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()0
Answers
-
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.
0 -
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.
0 -
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:0 -
Thank you Marcin !
0 -
Thank you Chavalit. I wil definitely try .NET API.
0 -
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
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 625 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛