All URIs are relative to https://api-v2.upstox.com
Method | HTTP request | Description |
---|---|---|
getMarketDataFeed | GET /feed/market-data-feed | Market Data Feed |
getMarketDataFeedAuthorize | GET /feed/market-data-feed/authorize | Market Data Feed Authorize |
getPortfolioStreamFeed | GET /feed/portfolio-stream-feed | Portfolio Stream Feed |
getPortfolioStreamFeedAuthorize | GET /feed/portfolio-stream-feed/authorize | Portfolio Stream Feed Authorize |
getMarketDataFeed(apiVersion)
Market Data Feed
This API redirects the client to the respective socket endpoint to receive Market updates.
import {UpstoxClient} from 'upstox-js-sdk';
let defaultClient = UpstoxClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAUTH2
let OAUTH2 = defaultClient.authentications['OAUTH2'];
OAUTH2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new UpstoxClient.WebsocketApi();
let apiVersion = "apiVersion_example"; // String | API Version Header
apiInstance.getMarketDataFeed(apiVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | String | API Version Header |
null (empty response body)
- Content-Type: Not defined
- Accept: /
WebsocketAuthRedirectResponse getMarketDataFeedAuthorize(apiVersion)
Market Data Feed Authorize
This API provides the functionality to retrieve the socket endpoint URI for Market updates.
import {UpstoxClient} from 'upstox-js-sdk';
let defaultClient = UpstoxClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAUTH2
let OAUTH2 = defaultClient.authentications['OAUTH2'];
OAUTH2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new UpstoxClient.WebsocketApi();
let apiVersion = "apiVersion_example"; // String | API Version Header
apiInstance.getMarketDataFeedAuthorize(apiVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | String | API Version Header |
- Content-Type: Not defined
- Accept: /, application/json
getPortfolioStreamFeed(apiVersion)
Portfolio Stream Feed
This API redirects the client to the respective socket endpoint to receive Portfolio updates.
import {UpstoxClient} from 'upstox-js-sdk';
let defaultClient = UpstoxClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAUTH2
let OAUTH2 = defaultClient.authentications['OAUTH2'];
OAUTH2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new UpstoxClient.WebsocketApi();
let apiVersion = "apiVersion_example"; // String | API Version Header
apiInstance.getPortfolioStreamFeed(apiVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | String | API Version Header |
null (empty response body)
- Content-Type: Not defined
- Accept: /
WebsocketAuthRedirectResponse getPortfolioStreamFeedAuthorize(apiVersion)
Portfolio Stream Feed Authorize
This API provides the functionality to retrieve the socket endpoint URI for Portfolio updates.
import {UpstoxClient} from 'upstox-js-sdk';
let defaultClient = UpstoxClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAUTH2
let OAUTH2 = defaultClient.authentications['OAUTH2'];
OAUTH2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new UpstoxClient.WebsocketApi();
let apiVersion = "apiVersion_example"; // String | API Version Header
apiInstance.getPortfolioStreamFeedAuthorize(apiVersion, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | String | API Version Header |
- Content-Type: Not defined
- Accept: /, application/json