Skip to content

Latest commit

 

History

History
217 lines (150 loc) · 6.6 KB

WebsocketApi.md

File metadata and controls

217 lines (150 loc) · 6.6 KB

upstox_client.WebsocketApi

All URIs are relative to https://api-v2.upstox.com

Method HTTP request Description
get_market_data_feed GET /feed/market-data-feed Market Data Feed
get_market_data_feed_authorize GET /feed/market-data-feed/authorize Market Data Feed Authorize
get_portfolio_stream_feed GET /feed/portfolio-stream-feed Portfolio Stream Feed
get_portfolio_stream_feed_authorize GET /feed/portfolio-stream-feed/authorize Portfolio Stream Feed Authorize

get_market_data_feed

get_market_data_feed(api_version)

Market Data Feed

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

Example

from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAUTH2
configuration = upstox_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = upstox_client.WebsocketApi(upstox_client.ApiClient(configuration))
api_version = 'api_version_example' # str | API Version Header

try:
    # Market Data Feed
    api_instance.get_market_data_feed(api_version)
except ApiException as e:
    print("Exception when calling WebsocketApi->get_market_data_feed: %s\n" % e)

Parameters

Name Type Description Notes
api_version str API Version Header

Return type

void (empty response body)

Authorization

OAUTH2

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_market_data_feed_authorize

WebsocketAuthRedirectResponse get_market_data_feed_authorize(api_version)

Market Data Feed Authorize

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

Example

from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAUTH2
configuration = upstox_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = upstox_client.WebsocketApi(upstox_client.ApiClient(configuration))
api_version = 'api_version_example' # str | API Version Header

try:
    # Market Data Feed Authorize
    api_response = api_instance.get_market_data_feed_authorize(api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebsocketApi->get_market_data_feed_authorize: %s\n" % e)

Parameters

Name Type Description Notes
api_version str API Version Header

Return type

WebsocketAuthRedirectResponse

Authorization

OAUTH2

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

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

get_portfolio_stream_feed

get_portfolio_stream_feed(api_version)

Portfolio Stream Feed

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

Example

from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAUTH2
configuration = upstox_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = upstox_client.WebsocketApi(upstox_client.ApiClient(configuration))
api_version = 'api_version_example' # str | API Version Header

try:
    # Portfolio Stream Feed
    api_instance.get_portfolio_stream_feed(api_version)
except ApiException as e:
    print("Exception when calling WebsocketApi->get_portfolio_stream_feed: %s\n" % e)

Parameters

Name Type Description Notes
api_version str API Version Header

Return type

void (empty response body)

Authorization

OAUTH2

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_portfolio_stream_feed_authorize

WebsocketAuthRedirectResponse get_portfolio_stream_feed_authorize(api_version)

Portfolio Stream Feed Authorize

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

Example

from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAUTH2
configuration = upstox_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = upstox_client.WebsocketApi(upstox_client.ApiClient(configuration))
api_version = 'api_version_example' # str | API Version Header

try:
    # Portfolio Stream Feed Authorize
    api_response = api_instance.get_portfolio_stream_feed_authorize(api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebsocketApi->get_portfolio_stream_feed_authorize: %s\n" % e)

Parameters

Name Type Description Notes
api_version str API Version Header

Return type

WebsocketAuthRedirectResponse

Authorization

OAUTH2

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

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