Market Data Feed Authorize
API to retrieve the designated socket endpoint URI for Market updates. This endpoint is intended for use with a WebSocket client. If automatic redirection is not configured through the Market Stream Feed API, this API serves as an alternative method to acquire the necessary wss://
URL for establishing a connection via a WebSocket client.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
- 200
Response Body
{
"status": "success",
"data": {
"authorized_redirect_uri": "wss://xyz.upstox.com/market-data-feeder/v2/upstox-developer-api/feeds?requestId=2f646f57-a097-4402-bb36-c44085c5f8e7&code=9355b100-25cf-4fa7-b038-06d27ddb4823",
"authorizedRedirectUri": "wss://xyz.upstox.com/market-data-feeder/v2/upstox-developer-api/feeds?requestId=2f646f57-a097-4402-bb36-c44085c5f8e7&code=9355b100-25cf-4fa7-b038-06d27ddb4823"
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for WebsocketAuthRedirectResponse |
data.authorized_redirect_uri | string | The verified URL used for secure WebSocket connections, allowing real-time market data updates. This URL is valid for one-time use because the code present as the req parameter is a single-use authentication token for the WebSocket connection. |
If there is no data to stream over an open WebSocket connection, the API automatically sends a standard ping
frame periodically to maintain the connection's aliveness. Most standard WebSocket client libraries across various programming languages handle this automatically by responding with a pong
frame, requiring no manual intervention.
The camelCase field (authorizedRedirectUri
) is deprecated and will be removed in future versions. Use the snake_case versions for consistency.