python can not get the "TR.MIDPRICE" data of “AUDQM3AB3Y=”,however the excel can do it

python code is:
ek.get_data(['AUDQM3AB3Y='],{"TR.MIDPRICE": {'params': {'SDate': '2017-12-28', 'CALCMETHOD': 'CLOSE', 'Points': 1}}})[0]
run it,we can get NAN like this:
Instrument Mid Price
0 AUDQM3AB3Y= NaN
However in excel,we can get the data.
EXCEL code is:
=RHistory("AUDQM3AB3Y=","MID_PRICE.Timestamp;MID_PRICE.Close","START:2017-12-28 NBROWS:1 TRADETIME:YES INTERVAL:1D",,"TSREPEAT:NO SORT:ASC NULL:NA CH:Fd")
Only AUD currency has this problem,AUDQM3AB5Y=, AUDSM6AB2Y=, AUDQM3AB3Y= all can not get the data through python.
However other currency like USDAM3L2Y=; CADSB3BA2Y=;CHFAB6L10Y= do not has the problem, they can get the data through excel or python.
How can I deal with the problem?
THANKS
Best Answer
-
The equivalent to RHistory in Excel is get_timeseries() The only problem here is that the get_timeseries() currently only supports the default "view", which for OTC instruments is BID. So, to summarise - there is no way that you can get the mid price into python, unfortunately.
0
Answers
-
Using Data Item Browser to check the data, it also returns no value.
This is the equivalent call on Excel:
=TR("AUDQM3AB5Y=","TR.MIDPRICE(CALCMETHOD=CLOSE)","SDate=2017-12-28 Points=1 CH=Fd RH=IN")
Which also returns Null value.
AUDQM3AB5Y= NULL
Please submit data question to ContactUs.
0 -
=RHistory("AUDQM3AB3Y=","MID_PRICE.Timestamp;MID_PRICE.Close","START:2017-12-28
NBROWS:1 TRADETIME:YES INTERVAL:1D",,"TSREPEAT:NO SORT:ASC NULL:NA
CH:Fd")what is the equivalent call of this on python.
thanks
0 -
Thanks for your answer.
But there is no problem with other currency RIC, such as: USDAM3L2Y=;CADSB3BA2Y=;CHFAB6L10Y=;GBPSB6L10Y=;SGDSB6SO4Y= and so on. I can get the mid data using get_data() in python, which is the same with the RHistory data in Excel. As you said, no way unfortunately to get the mid price in python. How to explain it?
Eikon python API not support AUD only?
Thanks very much !
0 -
Sorry for a bit of a delay on this, I did not understand your question fully.
You were referring to the RHistory() function in Excel, the equivalent of which in Python is get_timeseries(). The get_timeseries() function at the moment only supports the default set of fields, which is BID for all currency instruments. I hope this clarifies the difference between RHistory and get_timeseries().
Now, as for AUD, when you perform a get_data() call with TR.MIDPRICE, it accesses the reference database, and @chavalit-jintamalit has correctly pointed you to the data support desk.
Hope this clarifies it.
0 -
Just to add one more thing. It seems like the MID price for AUD IRS is available through get_data(), therefore, the content issue was fixed. The equivalent call for get_data() for last 100 points in Excel will be:
=TR("AUDQM3AB5Y=";"TR.MIDPRICE.date;TR.MIDPRICE.value";"SDate=0 EDate=-99")
0 -
Does this example help:
df, err = ek.get_data("AUDQM3AB5Y=",
[
'TR.MIDPRICE.date',
{'TR.MIDPRICE.value':{'params':{'SDate': '20171228','CALCMETHOD': 'CLOSE'}}},
{'TR.MIDPRICE.value':{'params':{'SDate': '20180110','CALCMETHOD': 'CLOSE'}}},
{'TR.MIDPRICE.value':{'params':{'SDate': '1D','CALCMETHOD': 'CLOSE'}}},
])resulting in:
Instrument Date Mid Price Mid Price Mid Price
0 AUDQM3AB5Y= 2018-01-24T00:00:00Z 2.395 2.375 2.503Note, that TR.MIDPRICE.date is the date of the run, with TR.MIDPRICE.value defined by SDate parameter
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 683 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.9K Refinitiv Data Platform
- 626 Refinitiv Data Platform Libraries
- 5 LSEG Due Diligence
- 1 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
- 84 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛