For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
15 4 3 9

Websocket API support for News Analytics?

Hi,

Does the Websocket API support News Analytics as from RIC MRN_TRNA by example? How to set the message model for this purpose in such case?

Kind regards,

Johan

treprdp-apiwebsocketsrrtonews
icon clock
10 |1500

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

Upvotes
Accepted
665 3 5 6

You need to specify the Domain, if you are using the "WEBSOCKET API TRY IT NOW! DOCUMENTATION" the request message should be constructed to appear like this:

{
  "ID": 2,
  "Domain":"NewsTextAnalytics",
  "Key": {
    "Name": "MRN_TRNA",
    "Service": "ELEKTRON"
  }
}

with any appropriate adjustments for your Service name and the "ID" value.

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @johan.lundquist

Yes Websocket does support the 'NewsTextAnalytics' domain - please see here for a full list of domains supported

You may also find the basic Websocket tutorials useful - whilst they do not deal specifically with MRN - there is section on setting the Domain attribute of a request:

Level 2 Market Depth Data

For example:

{
  "ID": 2,
  "Key": {
    "Name": "MRN_TRNA"
  },
  "Domain": "NewsTextAnalytics"
}
icon clock
10 |1500

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

Upvotes
9.7k 49 38 60

Hi @johan.lundquist

There is a Webinar available that discusses the processing of News that may provide additional details once you get into working with the data: https://developers.refinitiv.com/en/video-catalog/creating-a-real-time-news-monitor-app-with-mrn-and-elektron-websocket-api.

icon clock
10 |1500

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

Upvotes
15 4 3 9

Thank you it works fine, I have paste my output at the end.

I will look at the webinar for advise on how to decompress the gzipped message in field FRAGMENT.

Thanks,

Johan

RECEIVED:
[
{
"DoNotCache":true,
"Domain":"NewsTextAnalytics",
"Fields":{
"ACTIV_DATE":"2019-03-13",
"FRA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/DqMEk6To57W6aCvCs+sHrL4vi327so4WdOA/my6kb0XvVlts4SKfvQCuAcP1tVVw2LahvOfL0ZyfB3S60Hr5u6Bxm2PKUPbAMsIyqmTuiWlOVBbBZudtBDIia21b+uyFUN4z2z1z7GUC6+VGpbivBXLw/8lXAK2nQsv6rTuZwuqe+1fzQ9UV+rQJ8GbhvqdDi0ktclISqAM37QXv6nrScVzF77UoAalEviR01Ev3GtQ3v3joUgamKBlDA2o7ff/AjeZmilGCAAA",
"FRAG_NUM":1,
"GUID":"tr:PRrD76E1a_1903132CLEM4xgVUtVYD7THnrlApEaFXZ0OEJ34Wo0RS",
"MRN_SRC":"C291MKSA1AUK1-4.0.6_TRNA-C291MKSA1AUK1",
"MRN_TYPE":"TRNA",
"MRN_V_MAJ":"2",
"MRN_V_MIN":"10",
"TIMACT_MS":45888185,
"TOT_SIZE":1014
},
"ID":2,
"Key":{
"Name":"MRN_TRNA",
"Service":"IDN_SELECTFEED"
},
"PermData":"AwAXEAAqEAEKEAILEAIqEAQLEAQrEARbEAYqEBAaEBGbEBVaECMLECic",
"SeqNumber":17470,
"Type":"Update",
"UpdateType":"Unspecified"
}
]

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @johan.lundquist

For some guidance on dealing with the FRAGMENT you can refer to one of our Elektron SDK examples e..g for EMA Java there is a tutorial step on processing MRN data

Request & Decode Machine Readable News

Whilst this is not Websocket specific - the general guidance on how to Decode and re-assemble NewsTextAnalytics payloads should help.

icon clock
10 |1500

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

Click below to post an Idea Post Idea