I am using this hostname amer-1-t3.streaming-pricing-api.refinitiv.com
and these
mrn_domain = 'NewsTextAnalytics'
mrn_item = 'MRN_STORY'
Hello @prashanth.suresh1
Could you please let us know if you are encountering any issues when connects to amer-1-t3.streaming-pricing-api.refinitiv.com host?
I can use the cloud_mrn_notebook_app.ipynb example (download here) to connect and consume MRN data from amer-1-t3 host successfully.
You can use the following WebSocket API example to test the MRN subscription from RRTO:
When I tried to run I am stuck here in this method:
private void ReceiveMessage()
{
var readBuffer = new ArraySegment<byte>(new byte[RecvBufferSize]);
MemoryStream memoryStream = null;
byte[] dataBuffer = null;
while (!Stop && !Cts.IsCancellationRequested)
var result = WebSocket.ReceiveAsync(readBuffer, Cts.Token);
if (!result.IsFaulted)
if (result.Result.EndOfMessage)
if (memoryStream != null)
memoryStream.Write(readBuffer.Array ?? throw new InvalidOperationException(),
readBuffer.Offset, readBuffer.Count);
dataBuffer = memoryStream.GetBuffer();
memoryStream.Dispose();
}
else
dataBuffer = readBuffer.Array;
break;
if (memoryStream == null)
memoryStream = new MemoryStream((int) RecvBufferSize * 5);
readBuffer = new ArraySegment<byte>(new byte[RecvBufferSize]);
RaiseErrorEvent(DateTime.Now, WebSocket.State,
"Unhandled Exception occured inside ReceiveMessage()");
// Pass the data buffer back to app layer via callback.
RaiseMessageEvent(DateTime.Now, dataBuffer);
On the following line I am getting null exception
Exception :
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=System.Net.WebSockets.Client
StackTrace:
at System.Net.WebSockets.ClientWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
at WebsocketAdapter.WebsocketConnectionClient.ReceiveMessage() in \Files1\CNBC ARABIA\FeedHandler\Example.WebSocketAPI.CSharp.MRNWebSocketViewer-master\Example.WebSocketAPI.CSharp.MRNWebSocketViewer-master\WebsocketAdapter\WebsocketConnectionClient.cs:line 158