question

Upvotes
Accepted
3 1 1 2

Websocket API didn't receive response after Service Discovery Call

Hello!

We succesfully received token via https://api.refinitiv.com:443/auth/oauth2/v1/token

and then we are trying to call https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket.

But this https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket does not return anything.

One day ago, the request https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket correctly returned a list of endpoints.

If i try to call https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket via browser it return

code"401"message"Authorization header is missing"status"Unauthorized"

so we has an network access.

What it can be?

rdp-apirefinitiv-data-platformwebsockets
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.

Upvotes
Accepted
25.3k 87 12 25

Hi @elektron

Are you using C#?

If so, there is an issue due to the increase in the number of services added over the weekend, the response has started being chunked.

As a result of this, if you are using the C# example or another scenario where you are checking the service discovery response content length - this would now return -1 and something like the following would now fail:

if (webResponse.ContentLength > 0)

so the above should be replaced with something like:

if (webResponse.GetResponseHeader("Transfer-Encoding").Equals("chunked") || webResponse.ContentLength > 0)

Hope this helps.

If you were using our C# service discovery example on Github, these will be updated shortly.


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.

Upvotes
25.3k 87 12 25
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.

Upvotes
24.7k 54 17 14

Hello @elektron

Could you please try the Service Discovery request with the following curl command? Please replace the <access_token> with your Access Token from the RDP Auth Token service (Note: please notice a space between text 'Bearer' and the access token).

curl --location --request GET 'https://api.refinitiv.com/streaming/pricing/v1/' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <access token>'

If you still encounter errors from the curl command, I suggest you contact the RDP support team via https://my.refinitiv.com/ website to help you verify the issue.

myrefinitiv-rdp-servicedis.png

Please select the "Pricing - Refinitiv Data Platform" product on the my.refinitiv.com website, and give them the following information:

Hope this helps.


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.

Upvotes
25.3k 87 12 25

Hi @elektron

If you are using the github example, please note that as well as the above fix, there was another minor fix applied to the code - so recommend you download the latest version.

websocket-api/MarketPriceRdpGwServiceDiscoveryExample.cs at master · Refinitiv/websocket-api (github.com)

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.

Upvotes
3 1 1 2

Thank you for infromation.

Yes, we are using C # and will try to fix it with the provided examples.

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.

Upvotes
3 1 1 2

Hello!

Which product do I need to subscribe to at https://my.refinitiv.com/ in order to receive similar notifications?

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.

Hi @elektron - sorry don't understand your question - what kind of notifications do you require?

Thanks.

Hi @umer.nalla, i want to receive notifications about changes in API web socket.

i've alredy subscribed to "Refinitiv Real-Time - Optimized" alerts. What alerts do I need to subscribe to? please tell me is that enough?

Hi @elektron

You could watch the GitHub repo for Websocket API to be made aware of any changes.

We hope to add a 'Watch API' functionality on the Developer Portal - but I don't have a timescale for this.

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.