output from get_news_headlines is not within specified date range?

news = ek.get_news_headlines(query='R:CNH= and Language:LEN',
date_from='2019-05-13',
date_to='2019-05-13',
count=50
)
for i in news.index:
print(i, ' ' , news['text'][i])
From the code snippet above, I got the below output:
2019-05-20 11:18:33.150000 MORNING VIEW: LME base metals prices under pressure while trade dispute continues
2019-05-20 11:18:32.952000 Weak Turkish lira, renewed US-China tensions dampen Vietnam's HRC demand
Best Answer
-
Hi @Luke@MBBS
The story can be created and then modified later on. Please have a look at another example where you see more news that were created before a certain date and then consecutively updated. Basically the function is looking for news stories with certain topic or RIC in a defined time period (column versionCreated) which is an intuitive search from an end user perspective.
ek.get_news_headlines(query='Topic:TAL', date_from='2019-05-22T00:00:01', date_to='2019-05-22T23:59:59')
0
Answers
-
Can you try using datetime format:
news = ek.get_news_headlines(query='R:CNH= and Language:LEN', date_from='2019-05-13T00:00:00', date_to='2019-05-13T23:59:59', count=50)
0 -
hi @marcin.bunkowski, I tried the below and the first item I get is 22 march 2019
news = ek.get_news_headlines(query='R:CNH= and Language:LEN',
date_from='2019-05-13T00:00:00',
date_to='2019-05-13T23:59:59',
count=50)
for i in news.index:
print(i, ' ' , news['text'][i])I got:
2019-03-22 05:07:31 TAKE A LOOK-Asia inflation: India April retail rate highest in 6 months
2019-05-13 23:50:38 BUZZ-USD/CNH on path to 6.9800; test of nerves for authorities
2019-05-13 23:36:38 BUZZ-USD/CNH-Holds at 4-month high as China hits back
2019-05-13 23:10:22 BUZZ-Asia Day Ahead-Focus on repricing the U.S./China trade war
2019-05-13 22:54:31 UPDATE 1-Bitcoin tops $8,000 as it hits highest since July 2018
2019-05-13 22:06:14 BUZZ-AUD/USD-Trade war escalation renders major Fibo vulnerable
2019-05-13 21:49:35 BITCOIN PRICE TOPS $8,000 FOR FIRST TIME SINCE JULY 2018, RISES 16 PCT <BTC=BTSP>
2019-05-13 21:46:42.574000 Briefing.com: Fed Brief/BBI
2019-05-13 21:44:24.776000 Dow drops over 600 points as tariff war heats up; TSX proves resilient Canadian stocks escape with only minor losses thanks to gold, more attractive valuations
2019-05-13 21:33:21.674000 Sensex falls for 9th day, Nifty logs longest losing streak since 2011
2019-05-13 21:30:39.475000 Don't count on Donald Trump saving the stock market Anyone counting on the White House to rush to the aid of share prices after the market swoon on Monday is likely to be disappointed
2019-05-13 21:20:10.031000 Asia may help hasten end of U.S. dollar era Asean+3 has been mulling adding yuan and yen to reserve currency fund, a move analysts see as part of slow decline of American financial hegemony
2019-05-13 21:20:09.757000 LME set to revisit commodities connect scheme Three-stage plan to link London and Hong Kong exchanges will begin with six metals contracts
2019-05-13 20:50:18.300000 2019 First Quarter Financial Results
2019-05-13 20:48:14.397000 Briefing.com: Stock Market Update - 16:20 ET
2019-05-13 20:47:11.252000 Briefing.com: Stock Market Update - 16:20 ET
2019-05-13 20:19:25 GLOBAL MARKETS-Stocks dive, yuan weakens as U.S.-China trade fight intensifies
2019-05-13 20:18:26 LIVE MARKETS U.S.-Stocks trounced as trade war intensifies
2019-05-13 20:17:20.579000 Briefing.com: Hourly In Play (R) - 16:00 ET
2019-05-13 20:16:37.713000 Briefing.com: Bond Market Update - 15:55 ET
2019-05-13 19:47:03.112000 Briefing.com: Stock Market Update - 15:35 ET
2019-05-13 19:16:51.345000 Briefing.com: Stock Market Update - 14:55 ET
2019-05-13 19:06:39 BUZZ-Replay-Trade fear, aussie flashback, retail therapy
2019-05-13 18:51:29 Trump says U.S. farmers to get $15 bln in aid amid China trade spat
2019-05-13 18:41:44 2019-05-13 18:41:44 TRUMP SAYS U.S. PLANS TO PROVIDE ABOUT $15 BIL...
2019-05-13 18:41:44 TRUMP SAYS CHINA WILL PROBABLY RETALIATE AGAIN...
Name: text, dtype: object
2019-05-13 18:46:23.623000 Briefing.com: Stock Market Update - 14:30 ET
2019-05-13 18:41:44 2019-05-13 18:41:44 TRUMP SAYS U.S. PLANS TO PROVIDE ABOUT $15 BIL...
2019-05-13 18:41:44 TRUMP SAYS CHINA WILL PROBABLY RETALIATE AGAIN...
Name: text, dtype: object
2019-05-13 18:41:44.640000 TRUMP SAYS PORTION OF FUNDS U.S. TAKES IN FROM TARIFFS ON CHINESE IMPORTS WILL GO TO U.S. FARMERS
2019-05-13 18:35:35 LIVE MARKETS U.S.-Trade talks: It's complicated
2019-05-13 18:25:11 Trump says he will meet China's Xi and Russia's Putin at G20
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09 2019-05-13 18:19:09 TRUMP SAYS HE HAS NOT MADE THE DECISION TO GO ...
2019-05-13 18:19:09 TRUMP SAYS HE WILL MEET WITH XI AND PUTIN AT G20
2019-05-13 18:19:09 TRUMP SAYS CHINA'S BACKTRACKING IN TRADE TALKS...
2019-05-13 18:19:09 TRUMP SAYS U.S. HAD A DEAL WITH CHINA, HE SAYS...
2019-05-13 18:19:09 TRUMP SAYS U.S. IS IN A GREAT POSITION RIGHT NOW
2019-05-13 18:19:09 TRUMP SAYS U.S.-CHINA MEETING AT G20 COULD BE ...
2019-05-13 18:19:09 TRUMP SAYS THERE CAN BE SOME RETALIATION IN U....
2019-05-13 18:19:09 TRUMP, WITHOUT PROVIDING SPECIFICS IN DISCUSSI...
Name: text, dtype: object
2019-05-13 18:19:09.839000 TRUMP SAYS U.S. CAN NOT LET CHINA TAKE ADVANTAGE OF IT ANY LONGER
2019-05-13 18:16:23.530000 Briefing.com: Stock Market Update - 14:00 ET
2019-05-13 18:16:11.037000 Briefing.com: Stock Market Update - 14:00 ET
2019-05-13 18:11:24 BUZZ-AUD/USD knocked to four-month lows on trade war
2019-05-13 18:06:35 BUZZ-COMMENT-Trade headache may leave Fed yearning for retail therapy
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object
2019-05-13 17:46:47.761000 Briefing.com: Stock Market Update - 13:30 ET
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object
2019-05-13 17:29:54 2019-05-13 17:29:54 KAPLAN SAYS THE BEST THING THE FED CAN DO ON R...
2019-05-13 17:29:54 FED'S KAPLAN SAYS I DON'T THINK WE SHOULD BE C...
2019-05-13 17:29:54 FED'S KAPLAN SAYS FOR NOW FED'S RATE SETTING I...
2019-05-13 17:29:54 KAPLAN SAYS TRADE RELATIONSHIPS, PARTICULARLY ...
2019-05-13 17:29:54 KAPLAN SAYS HE IS HOPEFUL WILL WORK SOMETHING ...
2019-05-13 17:29:54 KAPLAN SAYS TARIFFS PUT SAND IN THE GEARS FOR ...
Name: text, dtype: object0 -
Hi @Luke@MBBS
I did check that news item and it looks that it is kind of a story that is updated with new lines as they come.
You can check that the latest version of the story was created on 2019-05-13.
And this is how it looks in Eikon desktop
0 -
@marcin.bunkowski does this mean that a story can be created and get modified eventually? If this is the case, then I'll assume the index of the dataframe will be indexed by the last modified timestamp of the news?
0 -
hi @marcin.bunkowski, also, there is a maximum of 100 new headlines we can retrieve?
0 -
Hi @Luke@MBBS yes, you are right, the upper limit is 100. You may check this thread as well.
0 -
ok thanks very much @marcin.bunkowski, I'm good with the answer.
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
- 622 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
- 84 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛