Confusion for get_data() function result

Hi all,
I am using python api to get daily volume and auction volume for instrument. However, I have confusing result as follow:
search_field =
['TR.Volume',
'TR.Volume.date',
'TR.Turnover',
'TR.NUMBEROFTRADES',
'TR.OPENINGAUCTIONVOLUME',
'TR.CLOSINGAUCTIONVOLUME',
'TR.INTRADAYAUCTIONVOLUME',
'TR.OPENINGAUCTIONPRICE',
'TR.CLOSINGAUCTIONPRICE',
'TR.INTRADAYAUCTIONPRICE']
result1 =
ek.get_data(['CFCG.DE'],search_fields,
{'SDate': '2020-03-02','EDate': '2020-03-05','Frq': 'D' })
result1
( Instrument Volume Date Turnover Number of Trades \
0 CFCG.DE 5188 2020-03-02T00:00:00Z 5468.40 4
1 CFCG.DE 10701 2020-03-03T00:00:00Z 11688.65 7
2 CFCG.DE 3400 2020-03-04T00:00:00Z 3830.00 2
3 CFCG.DE 20765 2020-03-05T00:00:00Z 21014.45 8
Opening Auction Volume Closing Auction Volume Intraday Auction Volume \
0 1089.0 NaN NaN
1 1277.0 NaN 40.0
2 NaN NaN 8517.0
3 NaN NaN NaN
Opening Auction Price Closing Auction Price Intraday Auction Price
0 1.05 1.020 NaN
1 1.00 1.070 1.11
2 NaN 1.100 1.01
3 NaN 0.995 NaN , None)
result2 =
ek.get_data(['CFCG.DE'],search_fields,
{'SDate': '2020-03-02','EDate': '2020-03-04','Frq': 'D' })
( Instrument Volume Date Turnover Number of Trades \
0 CFCG.DE 5188 2020-03-02T00:00:00Z 5468.40 4
1 CFCG.DE 10701 2020-03-03T00:00:00Z 11688.65 7
2 CFCG.DE 3400 2020-03-04T00:00:00Z 3830.00 2
Opening Auction Volume Closing Auction Volume Intraday Auction Volume \
0 1089.0 NaN NaN
1 1277.0 NaN 40.0
2 NaN NaN NaN
Opening Auction Price Closing Auction Price Intraday Auction Price
0 1.05 1.02 NaN
1 1.00 1.07 1.11
2 NaN 1.10 NaN , None)
result3 = vol= ek.get_data(['CFCG.DE'],search_fields,
{'SDate': '2020-03-04','EDate': '2020-03-04','Frq': 'D' })
( Instrument Volume Date Turnover Number of Trades \
0 CFCG.DE 3400 2020-03-04T00:00:00Z 3830 2
Opening Auction Volume Closing Auction Volume Intraday Auction Volume \
0 NaN NaN NaN
Opening Auction Price Closing Auction Price Intraday Auction Price
0 NaN 1.1 NaN , None)
Let us focus for date 2020-03-04 for result1,result2 and result3. As it can be seen at the above, the data for this particular date are consistent for result1, result2 and result3 except for Intraday Auction Volume. For result1, the intraday auction volume is 8517 for date 2020-03-04, while for result2 and result3 they are both NaN (no volume). This is inconsistent in my opinion as they are all supposed to be the same regardless how many dates I extract from the get_data() function. Kindly need your help. Thanks.
Best Answer
-
0
Answers
-
Hi @chavalit.jintamalit
So does it mean I cant search for multiple field with get_data()? For example I want to find at once TR.Volume and TR.INTRADAYTURNOVER? I tried:
result1 = ek.get_data(['CFCG.DE'],['TR.Volume.date','TR.Volume','TR.INTRADAYAUCTIONVOLUME.date','TR.INTRADAYAUCTIONVOLUME'],{'SDate':'2020-03-02','EDate': '2020-03-06', 'Frq':'D'})
But this results in two columns with the same name 'Date' such that python is unable to separate which date belongs to which field.
My second question, in your answer when we search for result between 2020-03-02 to 2020-03-05, why eikon API simply skips 2020-03-04 entirely? Why cant it keep 2020-03-04 in the data frame and gives result as NaN?
Many thanks.
0 -
You can use get_data() to request for multiple fields but if the fields are from different databases, the date may not be aligned.
TR.Volume and TR.INTRADAYAUCTIONVOLUME are from different databases.
Please see this post for more information, https://community.developers.refinitiv.com/questions/56148/how-to-sort-an-ekget-data-request-by-instrument-an.html
For second question:
If there is no data point, there will be no record.
For example:
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 167 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 688 Datastream
- 1.4K DSS
- 624 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 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
- 276 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
- 692 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 10 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛