upstox-dotnet

UpstoxClient.Api.WebsocketApi

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

void GetMarketDataFeed (string apiVersion)

Market Data Feed

This API redirects the client to the respective socket endpoint to receive Market updates.

Example

using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;

namespace Example
{
    public class GetMarketDataFeedExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: OAUTH2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebsocketApi();
            var apiVersion = apiVersion_example;  // string | API Version Header

            try
            {
                // Market Data Feed
                apiInstance.GetMarketDataFeed(apiVersion);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebsocketApi.GetMarketDataFeed: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
apiVersion string API Version Header  

Return type

void (empty response body)

Authorization

OAUTH2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMarketDataFeedAuthorize

WebsocketAuthRedirectResponse GetMarketDataFeedAuthorize (string apiVersion)

Market Data Feed Authorize

This API provides the functionality to retrieve the socket endpoint URI for Market updates.

Example

using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;

namespace Example
{
    public class GetMarketDataFeedAuthorizeExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: OAUTH2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebsocketApi();
            var apiVersion = apiVersion_example;  // string | API Version Header

            try
            {
                // Market Data Feed Authorize
                WebsocketAuthRedirectResponse result = apiInstance.GetMarketDataFeedAuthorize(apiVersion);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebsocketApi.GetMarketDataFeedAuthorize: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
apiVersion string API Version Header  

Return type

WebsocketAuthRedirectResponse

Authorization

OAUTH2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPortfolioStreamFeed

void GetPortfolioStreamFeed (string apiVersion)

Portfolio Stream Feed

This API redirects the client to the respective socket endpoint to receive Portfolio updates.

Example

using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;

namespace Example
{
    public class GetPortfolioStreamFeedExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: OAUTH2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebsocketApi();
            var apiVersion = apiVersion_example;  // string | API Version Header

            try
            {
                // Portfolio Stream Feed
                apiInstance.GetPortfolioStreamFeed(apiVersion);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebsocketApi.GetPortfolioStreamFeed: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
apiVersion string API Version Header  

Return type

void (empty response body)

Authorization

OAUTH2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPortfolioStreamFeedAuthorize

WebsocketAuthRedirectResponse GetPortfolioStreamFeedAuthorize (string apiVersion)

Portfolio Stream Feed Authorize

This API provides the functionality to retrieve the socket endpoint URI for Portfolio updates.

Example

using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;

namespace Example
{
    public class GetPortfolioStreamFeedAuthorizeExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: OAUTH2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebsocketApi();
            var apiVersion = apiVersion_example;  // string | API Version Header

            try
            {
                // Portfolio Stream Feed Authorize
                WebsocketAuthRedirectResponse result = apiInstance.GetPortfolioStreamFeedAuthorize(apiVersion);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebsocketApi.GetPortfolioStreamFeedAuthorize: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
apiVersion string API Version Header  

Return type

WebsocketAuthRedirectResponse

Authorization

OAUTH2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]