Websocket url scheme

Any specific reason you guys are using https instead of wss?

curl -L -X GET 'https://api.upstox.com/v2/feed/market-data-feed'

Here’s what your doc says. A standard java spring framework (which is widely used) also gives error due to non-standard scheme.

Web socket connection error: Invalid scheme: https

It is a standard practice to use wss scheme in websocket url.

You look at the docs of any broker for that matter if you like.

@priteshmhatre

To access the market data feeder, we offer two specific endpoints:

  1. /feed/market-data-feed - As outlined in the documentation, this endpoint acts as an auto-redirect. It checks the user’s session validity and then automatically redirects to a WebSocket endpoint for establishing a connection. Please note, when connecting via a WebSocket client, use the wss protocol instead of the https protocol.
  2. /feed/market-data-feed/authorize - Calling this endpoint using https will provide you with a wss endpoint. This wss endpoint is then used for connecting to the WebSocket API.

We acknowledge the confusion caused by the documentation and are working to correct it promptly.

Thank you for bringing this to our attention.

Thank you!

Why is this information not documented? And also what is the reason of using an additional steps to get wss url instead providing the wss url directly; just like what the industry standard is?

I did further research, I do not see any additional benefit of adding an extra step to get websocket url.

  • It does not provide any additional security
  • Authentication can directly be done using wss url by passing authentication headers
  • You are just making the developer do additional work
  • And not even following the common standard, which is to expose wss url publicly