Got the wss url using the following:
Portfolio Stream Feed Authorize Url | Upstox Developer API
Once I connected to wss url, it was working fine (till yesterday ) without any additional authentication headers (on wss websocket request)
Today, all of a sudden I am getting unauthorized error, see screenshot below:
WSS URL:
wss://wsportfolio-api.upstox.com/upstox-developer-api/order-updates/feed?requestId=9934cb8d-0fbd-48b2-b28a-4ae34535d843&code=1DAPx-eb656a03-6daa-4381-8cde-37d18980f90e
shanmu
February 7, 2024, 9:58am
2
@priteshmhatre
The url generated to connect to the websocket is valid for one time use as the code param present in the URI is for single-use. Please generate a new URL to reconnect to the websocket. We’ll explicitly mention this in the documentation.
On the contrary, using the Market Feeder Auto Redirect Endpoint should take care of the auth and re-connect automatically.
Thanks!!
@shanmu
I am regenerating the url, so I looked further into it.
My connection is established & later disconnected with following error message. This message comes when I send a ping. My pings are a simple text message with word ping .
WS connection closed. Status [CloseStatus[code=1003, reason=Client messages not supported]]
So, it seems this is the cause. Please give me the exact format of the heartbeat message.
shanmu
February 7, 2024, 4:48pm
4
@priteshmhatre
Please refer to the following response:
@priteshmhatre
Our WebSocket server sends out ping events, expecting a corresponding pong response. Most WebSocket clients across various programming languages handle this automatically. If you choose to customize the default behavior, you should ensure your client listens for pings and sends back pongs accordingly.
We accept any general payload with the pong response and do not require a specific format.
Thank you!
@shanmu Please close the ticket.
HI all iam getting Handshake status 410 Gone while trying to connect with websocket for market data
Hi @Panthadi_6030151 You’ll need to use the V3 WebSocket, V2 WebSocket was deprecated —please check the announcements below
Hey folks,
Our new maket feeder - websockets v3 , have been live for about 5 months now. Thanks to the community that has been instrumental in helping up make it better and right.
Over last 2 months, we’ve recorded 100% p99 stability on the v3 sockets. And this calls for retiring the well served websocket v2 market feeder.
Please take this as an important notice.
We will be deprecating the v2 market feeder on 30th of June 2025. Post that our v3 websocket will be the default socket for market …