Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 4 8

get_news_story for ALERT ?

hello, i believe this function call works for news stories...

storyResult = ek.get_news_story(storyId, True, True)

it comes back with html data, such as in this example:

example for storyID = urn:newsml:newswire.refinitiv.com:20230112:nTUC5DHVC3:8

return value is:

<html><body><div class="storyContent" lang="en"><style type="text/css">.storyContent * {border-color:inherit !important;outline-color:inherit !important;}</style><p class="tr-story-p1"><span class="tr-dateline">Jan 12 (Reuters)</span><span class="tr-dl-sep"> - </span>German professional kitchen supplier Rational <a data-ric="RAAG.DE" data-type="ric" dir="ltr" href="reuters://REALTIME/Verb=FullQuote/ric=RAAG.DE" translate="no">RAAG.DE</a> said on Thursday it expects sales revenues to exceed one billion euros for the first time in 2022. </p><p>This corresponds to 31% growth year on year, above the company's September forecast of annual growth at 23-28%.</p><p><br/></p><p><br/></p><p class="tr-signoff"> (Reporting by Andrey Sychev in Gdansk, editing by Rachel More)</p><p class="tr-contactinfo">(( <a data-type="email" href="mailto:andrey.sychev2@thomsonreuters.com" translate="no">andrey.sychev2@thomsonreuters.com</a> ;))</p><p class="line-break"><br/></p><p class="tr-copyright">(c) Copyright Thomson Reuters 2023. Click For Restrictions - https://agency.reuters.com/en/copyright.html</p><p class="line-break"><br/></p><p class="tr-slugline">Keywords: RATIONAL-SALES/</p></div></body></html>

but i am wondering if for "ALERT" type stories, perhaps, get_news_story effectively comes back with blank data / empty html tags every time? i want, certainly, to access the RICs associated with the ALERTs. to do that, if my assumption that get_news_story won't work, then is there a different function besides get_news_story that i can use to help gain access to the RICs associated with the ALERT?

example:

storyId = urn:newsml:newswire.refinitiv.com:20230112:nFWN33X3F9:1

storyResult = ek.get_news_story(storyId, True, True)

return value is ("blank"):

<html><body><div class="storyContent" lang="en"></div></body></html>


eikon-data-apipythonrefinitiv-dataplatform-eikon#technology#content
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @mjg

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
78.8k 249 52 74

@mjg

Thanks for reaching out to us.

I checked with Eikon and found that Eikon also doesn't show the story of this alert.

The first part of a story may be an alert. This is a headline-only message containing the most essential information relating to an emerging story. Sometimes several alerts for the same story are filed in quick succession.

According to the above definition, alerts can be headline-only messages.

I hope this will help.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you, but alerts definitely - in tthe Eikon terminal - have Symbols associated with them. I don't need a story - I need a symbol or an RIC associated with the Alert. maybe that helps clarify. thank you.
Upvotes
78.8k 249 52 74

@mjg

As I know, typically, associated RICs appear as metadata in headlines but the ek.get_news_headlines method is unable to retrieve it.

The following is the raw data retrieved by the ek.get_news_headlines method.

{
   "displayDirection":"LeftToRight",
   "documentType":"Story",
   "firstCreated":"2023-01-13T04:32:44.000Z",
   "isAlert":true,
   "language":"L:en",
   "reportCode":"",
   "sourceCode":"NS:RTRS",
   "sourceName":"Reuters News",
   "storyId":"urn:newsml:newswire.refinitiv.com:20230113:nL4N33Y14B:1",
   "text":"TESLA CUTS PRICES IN UNITED STATES - TESLA WEBSITE",
   "versionCreated":"2023-01-13T04:32:44.000Z"
}

The following is the raw data retrieved from the Refinitiv Data Platform News endpoint (/data/news/v1/headlines).

{'storyId': 'urn:newsml:reuters.com:20230113:nL4N33Y14B:1',
   'newsItem': {'_version': 1,
    'contentMeta': {'audience': [{'_qcode': 'NP:E'},
      {'_qcode': 'NP:NAW'},
      {'_qcode': 'NP:U'}],
     'creator': [{'_qcode': 'NS:RTRS', '_role': 'sRole:source'}],
     'infoSource': [{'_qcode': 'NS:RTRS', '_role': 'sRole:source'},
      {'_qcode': 'NS:RTRS', '_role': 'sRole:origProv'}],
     'language': [{'_tag': 'en'}],
     'subject': [{'_qcode': 'B:255'},
      {'_qcode': 'G:4'},
      {'_qcode': 'B:69'},
      {'_qcode': 'G:9'},
      {'_qcode': 'M:2CQ'},
      {'_qcode': 'M:2DZ'},
      {'_qcode': 'B:72'},
      {'_qcode': 'G:6J'},
      {'_qcode': 'M:2CP'},
      {'_qcode': 'M:2D1'},
      {'_qcode': 'M:2CS'},
      {'_qcode': 'G:K'},
      {'_qcode': 'B:71'},
      {'_qcode': 'R:TSLA.O'},
      {'_qcode': 'B:1296'},
      {'_qcode': 'M:Z'},
      {'_qcode': 'M:1QD'},
      {'_qcode': 'G:1'},
      {'_qcode': 'M:9X'},
      {'_qcode': 'M:2CN'},
      {'_qcode': 'P:4297089638'}],
     'urgency': {'$': 1}},
    'itemMeta': {'firstCreated': {'$': '2023-01-13T04:32:44.000Z'},
     'versionCreated': {'$': '2023-01-13T04:32:44.000Z'},
     'title': [{'$': 'TESLA CUTS PRICES IN UNITED STATES - TESLA WEBSITE'}]},
    'assert': [{'_qcode': 'B:255'},
     {'_qcode': 'G:4'},
     {'_qcode': 'B:69'},
     {'_qcode': 'G:9'},
     {'_qcode': 'M:2CQ'},
     {'_qcode': 'M:2DZ'},
     {'_qcode': 'B:72'},
     {'_qcode': 'G:6J'},
     {'_qcode': 'M:2CP'},
     {'_qcode': 'M:2D1'},
     {'_qcode': 'M:2CS'},
     {'_qcode': 'G:K'},
     {'_qcode': 'B:71'},
     {'_qcode': 'R:TSLA.O'},
     {'_qcode': 'B:1296'},
     {'_qcode': 'M:Z'},
     {'_qcode': 'M:1QD'},
     {'_qcode': 'G:1'},
     {'_qcode': 'M:9X'},
     {'_qcode': 'M:2CN'},
     {'_qcode': 'P:4297089638'}]}}

The raw data from the Refinitiv Data Platform contains associated RICs ({'_qcode': 'R:TSLA.O'}) in the metadata.

Please contact your Refinitiv account team directly to get more information or explore other solutions.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.