upstox-python-sdk


Nameupstox-python-sdk JSON
Version 2.9.0 PyPI version JSON
download
home_pagehttps://github.com/upstox/upstox-python
SummaryUpstox Developer API
upload_time2024-10-10 14:08:38
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords upstox developer api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # Upstox Python SDK for API v2

[![PyPI](https://img.shields.io/pypi/v/upstox-python-sdk?label=upstox-python-sdk)](https://pypi.python.org/pypi/upstox-python-sdk)

## Introduction

The official Python client for communicating with the <a href="https://upstox.com/uplink/">Upstox API</a>.

Upstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection. 

- API version: v2
- Package version: 2.9.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project.

## Documentation.

<a href="https://upstox.com/developer/api-documentation">Upstox API Documentation</a>

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install upstox-python-sdk
```
(you may need to run `pip` with root permission: `sudo pip install upstox-python-sdk`)

Then import the package:
```python
import upstox_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import upstox_client
```

## Examples

[Sample Implementations](examples/) can be found within `/examples` folder.

- [Websocket Market data](examples/websocket/market_data/)
- [Websocket Order updates](examples/websocket/order_updates/)

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ChargeApi* | [**get_brokerage**](docs/ChargeApi.md#get_brokerage) | **GET** /v2/charges/brokerage | Brokerage details
*ChargeApi* | [**post_margin**](docs/ChargeApi.md#post_margin) | **POST** /v2/charges/margin | Calculate Margin
*HistoryApi* | [**get_historical_candle_data**](docs/HistoryApi.md#get_historical_candle_data) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date} | Historical candle data
*HistoryApi* | [**get_historical_candle_data1**](docs/HistoryApi.md#get_historical_candle_data1) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date}/{from_date} | Historical candle data
*HistoryApi* | [**get_intra_day_candle_data**](docs/HistoryApi.md#get_intra_day_candle_data) | **GET** /v2/historical-candle/intraday/{instrumentKey}/{interval} | Intra day candle data
*LoginApi* | [**authorize**](docs/LoginApi.md#authorize) | **GET** /v2/login/authorization/dialog | Authorize API
*LoginApi* | [**logout**](docs/LoginApi.md#logout) | **DELETE** /v2/logout | Logout
*LoginApi* | [**token**](docs/LoginApi.md#token) | **POST** /v2/login/authorization/token | Get token API
*MarketHolidaysAndTimingsApi* | [**get_exchange_timings**](docs/MarketHolidaysAndTimingsApi.md#get_exchange_timings) | **GET** /v2/market/timings/{date} | Get Exchange Timings on particular date
*MarketHolidaysAndTimingsApi* | [**get_holiday**](docs/MarketHolidaysAndTimingsApi.md#get_holiday) | **GET** /v2/market/holidays/{date} | Get Holiday on particular date
*MarketHolidaysAndTimingsApi* | [**get_holidays**](docs/MarketHolidaysAndTimingsApi.md#get_holidays) | **GET** /v2/market/holidays | Get Holiday list of current year
*MarketHolidaysAndTimingsApi* | [**get_market_status**](docs/MarketHolidaysAndTimingsApi.md#get_market_status) | **GET** /v2/market/status/{exchange} | Get Market status for particular exchange
*MarketQuoteApi* | [**get_full_market_quote**](docs/MarketQuoteApi.md#get_full_market_quote) | **GET** /v2/market-quote/quotes | Market quotes and instruments - Full market quotes
*MarketQuoteApi* | [**get_market_quote_ohlc**](docs/MarketQuoteApi.md#get_market_quote_ohlc) | **GET** /v2/market-quote/ohlc | Market quotes and instruments - OHLC quotes
*MarketQuoteApi* | [**ltp**](docs/MarketQuoteApi.md#ltp) | **GET** /v2/market-quote/ltp | Market quotes and instruments - LTP quotes.
*OptionsApi* | [**get_option_contracts**](docs/OptionsApi.md#get_option_contracts) | **GET** /v2/option/contract | Get option contracts
*OptionsApi* | [**get_put_call_option_chain**](docs/OptionsApi.md#get_put_call_option_chain) | **GET** /v2/option/chain | Get option chain
*OrderApi* | [**cancel_multi_order**](docs/OrderApi.md#cancel_multi_order) | **DELETE** /v2/order/multi/cancel | Cancel multi order
*OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **DELETE** /v2/order/cancel | Cancel order
*OrderApi* | [**exit_positions**](docs/OrderApi.md#exit_positions) | **POST** /v2/order/positions/exit | Exit all positions
*OrderApi* | [**get_order_book**](docs/OrderApi.md#get_order_book) | **GET** /v2/order/retrieve-all | Get order book
*OrderApi* | [**get_order_details**](docs/OrderApi.md#get_order_details) | **GET** /v2/order/history | Get order history
*OrderApi* | [**get_order_status**](docs/OrderApi.md#get_order_status) | **GET** /v2/order/details | Get order details
*OrderApi* | [**get_trade_history**](docs/OrderApi.md#get_trade_history) | **GET** /v2/order/trades/get-trades-for-day | Get trades
*OrderApi* | [**get_trades_by_order**](docs/OrderApi.md#get_trades_by_order) | **GET** /v2/order/trades | Get trades for order
*OrderApi* | [**modify_order**](docs/OrderApi.md#modify_order) | **PUT** /v2/order/modify | Modify order
*OrderApi* | [**place_multi_order**](docs/OrderApi.md#place_multi_order) | **POST** /v2/order/multi/place | Place multi order
*OrderApi* | [**place_order**](docs/OrderApi.md#place_order) | **POST** /v2/order/place | Place order
*PortfolioApi* | [**convert_positions**](docs/PortfolioApi.md#convert_positions) | **PUT** /v2/portfolio/convert-position | Convert Positions
*PortfolioApi* | [**get_holdings**](docs/PortfolioApi.md#get_holdings) | **GET** /v2/portfolio/long-term-holdings | Get Holdings
*PortfolioApi* | [**get_positions**](docs/PortfolioApi.md#get_positions) | **GET** /v2/portfolio/short-term-positions | Get Positions
*PostTradeApi* | [**get_trades_by_date_range**](docs/PostTradeApi.md#get_trades_by_date_range) | **GET** /v2/charges/historical-trades | Get historical trades
*TradeProfitAndLossApi* | [**get_profit_and_loss_charges**](docs/TradeProfitAndLossApi.md#get_profit_and_loss_charges) | **GET** /v2/trade/profit-loss/charges | Get profit and loss on trades
*TradeProfitAndLossApi* | [**get_trade_wise_profit_and_loss_data**](docs/TradeProfitAndLossApi.md#get_trade_wise_profit_and_loss_data) | **GET** /v2/trade/profit-loss/data | Get Trade-wise Profit and Loss Report Data
*TradeProfitAndLossApi* | [**get_trade_wise_profit_and_loss_meta_data**](docs/TradeProfitAndLossApi.md#get_trade_wise_profit_and_loss_meta_data) | **GET** /v2/trade/profit-loss/metadata | Get profit and loss meta data on trades
*UserApi* | [**get_profile**](docs/UserApi.md#get_profile) | **GET** /v2/user/profile | Get profile
*UserApi* | [**get_user_fund_margin**](docs/UserApi.md#get_user_fund_margin) | **GET** /v2/user/get-funds-and-margin | Get User Fund And Margin
*WebsocketApi* | [**get_market_data_feed**](docs/WebsocketApi.md#get_market_data_feed) | **GET** /v2/feed/market-data-feed | Market Data Feed
*WebsocketApi* | [**get_market_data_feed_authorize**](docs/WebsocketApi.md#get_market_data_feed_authorize) | **GET** /v2/feed/market-data-feed/authorize | Market Data Feed Authorize
*WebsocketApi* | [**get_portfolio_stream_feed**](docs/WebsocketApi.md#get_portfolio_stream_feed) | **GET** /v2/feed/portfolio-stream-feed | Portfolio Stream Feed
*WebsocketApi* | [**get_portfolio_stream_feed_authorize**](docs/WebsocketApi.md#get_portfolio_stream_feed_authorize) | **GET** /v2/feed/portfolio-stream-feed/authorize | Portfolio Stream Feed Authorize

## Documentation for Feeder Functions

Connecting to the WebSocket for market and portfolio updates is streamlined through two primary Feeder functions:

1. **MarketDataStreamer**: Offers real-time market updates, providing a seamless way to receive instantaneous information on various market instruments.
2. **PortfolioDataStreamer**: Delivers updates related to the user's orders, enhancing the ability to track order status and portfolio changes effectively.

Both functions are designed to simplify the process of subscribing to essential data streams, ensuring users have quick and easy access to the information they need.

### Detailed Explanation of Feeder Interface

### MarketDataStreamer

The `MarketDataStreamer` interface is designed for effortless connection to the market WebSocket, enabling users to receive instantaneous updates on various instruments. The following example demonstrates how to quickly set up and start receiving market updates for selected instrument keys:

```python
import upstox_client

def on_message(message):
    print(message)


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration), ["NSE_INDEX|Nifty 50", "NSE_INDEX|Nifty Bank"], "full")

    streamer.on("message", on_message)

    streamer.connect()


if __name__ == "__main__":
    main()
```

In this example, you first authenticate using an access token, then instantiate MarketDataStreamer with specific instrument keys and a subscription mode. Upon connecting, the streamer listens for market updates, which are logged to the console as they arrive.

Feel free to adjust the access token placeholder and any other specifics to better fit your actual implementation or usage scenario.

### Exploring the MarketDataStreamer Functionality

#### Modes
- **ltpc**: ltpc provides information solely about the most recent trade, encompassing details such as the last trade price, time of the last trade, quantity traded, and the closing price from the previous day.
- **full**: The full option offers comprehensive information, including the latest trade prices, D5 depth, 1-minute, 30-minute, and daily candlestick data, along with some additional details.

#### Functions
1. **constructor MarketDataStreamer(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full` or `ltpc`).
2. **connect()**: Establishes the WebSocket connection.
3. **subscribe(instrumentKeys, mode)**: Subscribes to updates for given instrument keys in the specified mode. Both parameters are mandatory.
4. **unsubscribe(instrumentKeys)**: Stops updates for the specified instrument keys.
5. **changeMode(instrumentKeys, mode)**: Switches the mode for already subscribed instrument keys.
6. **disconnect()**: Ends the active WebSocket connection.
7. **auto_reconnect(enable, interval, retryCount)**: Customizes auto-reconnect functionality. Parameters include a flag to enable/disable it, the interval(in seconds) between attempts, and the maximum number of retries.

#### Events
- **open**: Emitted upon successful connection establishment.
- **close**: Indicates the WebSocket connection has been closed.
- **message**: Delivers market updates.
- **error**: Signals an error has occurred.
- **reconnecting**: Announced when a reconnect attempt is initiated.
- **autoReconnectStopped**: Informs when auto-reconnect efforts have ceased after exhausting the retry count.

The following documentation includes examples to illustrate the usage of these functions and events, providing a practical understanding of how to interact with the MarketDataStreamer effectively.

<br/>

1. Subscribing to Market Data on Connection Open with MarketDataStreamer

```python
import upstox_client

def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    def on_open():
        streamer.subscribe(
            ["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"], "full")

    def on_message(message):
        print(message)

    streamer.on("open", on_open)
    streamer.on("message", on_message)

    streamer.connect()

if __name__ == "__main__":
    main()
```

<br/>

2. Subscribing to Instruments with Delays

```python
import upstox_client
import time


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    def on_open():
        streamer.subscribe(
            ["NSE_EQ|INE020B01018"], "full")

    # Handle incoming market data messages\
    def on_message(message):
        print(message)

    streamer.on("open", on_open)
    streamer.on("message", on_message)

    streamer.connect()

    time.sleep(5)
    streamer.subscribe(
        ["NSE_EQ|INE467B01029"], "full")


if __name__ == "__main__":
    main()

```

<br/>

3. Subscribing and Unsubscribing to Instruments

```python
import upstox_client
import time


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    def on_open():
        print("Connected. Subscribing to instrument keys.")
        streamer.subscribe(
            ["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"], "full")

    # Handle incoming market data messages\
    def on_message(message):
        print(message)

    streamer.on("open", on_open)
    streamer.on("message", on_message)

    streamer.connect()

    time.sleep(5)
    print("Unsubscribing from instrument keys.")
    streamer.unsubscribe(["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"])


if __name__ == "__main__":
    main()
```

<br/>

4. Subscribe, Change Mode and Unsubscribe

```python
import upstox_client
import time

def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    def on_open():
        print("Connected. Subscribing to instrument keys.")
        streamer.subscribe(
            ["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"], "full")

    # Handle incoming market data messages\
    def on_message(message):
        print(message)

    streamer.on("open", on_open)
    streamer.on("message", on_message)

    streamer.connect()

    time.sleep(5)
    print("Changing subscription mode to ltpc...")
    streamer.change_mode(
        ["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"], "ltpc")

    time.sleep(5)
    print("Unsubscribing from instrument keys.")
    streamer.unsubscribe(["NSE_EQ|INE020B01018", "NSE_EQ|INE467B01029"])


if __name__ == "__main__":
    main()
```

<br/>

5. Disable Auto-Reconnect

```python
import upstox_client
import time


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    def on_reconnection_halt(message):
        print(message)

    streamer.on("autoReconnectStopped", on_reconnection_halt)

    # Disable auto-reconnect feature
    streamer.auto_reconnect(False)

    streamer.connect()


if __name__ == "__main__":
    main()
```

<br/>

6. Modify Auto-Reconnect parameters

```python
import upstox_client


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.MarketDataStreamer(
        upstox_client.ApiClient(configuration))

    # Modify auto-reconnect parameters: enable it, set interval to 10 seconds, and retry count to 3
    streamer.auto_reconnect(True, 10, 3)

    streamer.connect()


if __name__ == "__main__":
    main()
```

<br/>

### PortfolioDataStreamer

Connecting to the Portfolio WebSocket for real-time order updates is straightforward with the PortfolioDataStreamer function. Below is a concise guide to get you started on receiving updates:

```python
import upstox_client

def on_message(message):
    print(message)


def main():
    configuration = upstox_client.Configuration()
    access_token = <ACCESS_TOKEN>
    configuration.access_token = access_token

    streamer = upstox_client.PortfolioDataStreamer(
        upstox_client.ApiClient(configuration))

    streamer.on("message", on_message)

    streamer.connect()


if __name__ == "__main__":
    main()
```
<br/>

Position and holding updates can be enabled by setting the corresponding flag to `True` in the constructor of the `PortfolioDataStreamer` class.

```python
import upstox_client
import data_token


def on_message(message):
    print(message)


def on_open():
    print("connection opened")


def main():
    configuration = upstox_client.Configuration()
    configuration.access_token = <ACCESS_TOKEN>

    streamer = upstox_client.PortfolioDataStreamer(upstox_client.ApiClient(configuration),order_update=True,position_update=True,holding_update=True)

    streamer.on("message", on_message)
    streamer.on("open", on_open)
    streamer.connect()


if __name__ == "__main__":
    main()

```

<br/>

This example demonstrates initializing the PortfolioDataStreamer, connecting it to the WebSocket, and setting up an event listener to receive and print order updates. Replace <ACCESS_TOKEN> with your valid access token to authenticate the session.

### Exploring the PortfolioDataStreamer Functionality

#### Functions
1. **constructor PortfolioDataStreamer()**: Initializes the streamer.
2. **connect()**: Establishes the WebSocket connection.
6. **disconnect()**: Ends the active WebSocket connection.
7. **auto_reconnect(enable, interval, retryCount)**: Customizes auto-reconnect functionality. Parameters include a flag to enable/disable it, the interval(in seconds) between attempts, and the maximum number of retries.

#### Events
- **open**: Emitted upon successful connection establishment.
- **close**: Indicates the WebSocket connection has been closed.
- **message**: Delivers market updates.
- **error**: Signals an error has occurred.
- **reconnecting**: Announced when a reconnect attempt is initiated.
- **autoReconnectStopped**: Informs when auto-reconnect efforts have ceased after exhausting the retry count.

## Documentation For Models

 - [AnalyticsData](docs/AnalyticsData.md)
 - [ApiGatewayErrorResponse](docs/ApiGatewayErrorResponse.md)
 - [BatchExecutionSummary](docs/BatchExecutionSummary.md)
 - [BrokerageData](docs/BrokerageData.md)
 - [BrokerageTaxes](docs/BrokerageTaxes.md)
 - [BrokerageWrapperData](docs/BrokerageWrapperData.md)
 - [CancelOrExitMultiOrderData](docs/CancelOrExitMultiOrderData.md)
 - [CancelOrExitMultiOrderResponse](docs/CancelOrExitMultiOrderResponse.md)
 - [CancelOrExitOrderErrorData](docs/CancelOrExitOrderErrorData.md)
 - [CancelOrderData](docs/CancelOrderData.md)
 - [CancelOrderResponse](docs/CancelOrderResponse.md)
 - [ConvertPositionData](docs/ConvertPositionData.md)
 - [ConvertPositionRequest](docs/ConvertPositionRequest.md)
 - [ConvertPositionResponse](docs/ConvertPositionResponse.md)
 - [Depth](docs/Depth.md)
 - [DepthMap](docs/DepthMap.md)
 - [DpPlan](docs/DpPlan.md)
 - [ExchangeTimingData](docs/ExchangeTimingData.md)
 - [GetBrokerageResponse](docs/GetBrokerageResponse.md)
 - [GetExchangeTimingResponse](docs/GetExchangeTimingResponse.md)
 - [GetFullMarketQuoteResponse](docs/GetFullMarketQuoteResponse.md)
 - [GetHistoricalCandleResponse](docs/GetHistoricalCandleResponse.md)
 - [GetHoldingsResponse](docs/GetHoldingsResponse.md)
 - [GetHolidayResponse](docs/GetHolidayResponse.md)
 - [GetIntraDayCandleResponse](docs/GetIntraDayCandleResponse.md)
 - [GetMarketQuoteLastTradedPriceResponse](docs/GetMarketQuoteLastTradedPriceResponse.md)
 - [GetMarketQuoteOHLCResponse](docs/GetMarketQuoteOHLCResponse.md)
 - [GetMarketStatusResponse](docs/GetMarketStatusResponse.md)
 - [GetOptionChainResponse](docs/GetOptionChainResponse.md)
 - [GetOptionContractResponse](docs/GetOptionContractResponse.md)
 - [GetOrderBookResponse](docs/GetOrderBookResponse.md)
 - [GetOrderDetailsResponse](docs/GetOrderDetailsResponse.md)
 - [GetOrderResponse](docs/GetOrderResponse.md)
 - [GetPositionResponse](docs/GetPositionResponse.md)
 - [GetProfileResponse](docs/GetProfileResponse.md)
 - [GetProfitAndLossChargesResponse](docs/GetProfitAndLossChargesResponse.md)
 - [GetTradeResponse](docs/GetTradeResponse.md)
 - [GetTradeWiseProfitAndLossDataResponse](docs/GetTradeWiseProfitAndLossDataResponse.md)
 - [GetTradeWiseProfitAndLossMetaDataResponse](docs/GetTradeWiseProfitAndLossMetaDataResponse.md)
 - [GetUserFundMarginResponse](docs/GetUserFundMarginResponse.md)
 - [HistoricalCandleData](docs/HistoricalCandleData.md)
 - [HoldingsData](docs/HoldingsData.md)
 - [HolidayData](docs/HolidayData.md)
 - [Instrument](docs/Instrument.md)
 - [InstrumentData](docs/InstrumentData.md)
 - [IntraDayCandleData](docs/IntraDayCandleData.md)
 - [LogoutResponse](docs/LogoutResponse.md)
 - [Margin](docs/Margin.md)
 - [MarginData](docs/MarginData.md)
 - [MarginRequest](docs/MarginRequest.md)
 - [MarketData](docs/MarketData.md)
 - [MarketQuoteOHLC](docs/MarketQuoteOHLC.md)
 - [MarketQuoteSymbol](docs/MarketQuoteSymbol.md)
 - [MarketQuoteSymbolLtp](docs/MarketQuoteSymbolLtp.md)
 - [MarketStatusData](docs/MarketStatusData.md)
 - [ModifyOrderData](docs/ModifyOrderData.md)
 - [ModifyOrderRequest](docs/ModifyOrderRequest.md)
 - [ModifyOrderResponse](docs/ModifyOrderResponse.md)
 - [MultiOrderData](docs/MultiOrderData.md)
 - [MultiOrderError](docs/MultiOrderError.md)
 - [MultiOrderRequest](docs/MultiOrderRequest.md)
 - [MultiOrderResponse](docs/MultiOrderResponse.md)
 - [MultiOrderSummary](docs/MultiOrderSummary.md)
 - [OAuthClientException](docs/OAuthClientException.md)
 - [OAuthClientExceptionCause](docs/OAuthClientExceptionCause.md)
 - [OAuthClientExceptionCauseStackTrace](docs/OAuthClientExceptionCauseStackTrace.md)
 - [OAuthClientExceptionCauseSuppressed](docs/OAuthClientExceptionCauseSuppressed.md)
 - [Ohlc](docs/Ohlc.md)
 - [OptionStrikeData](docs/OptionStrikeData.md)
 - [OrderBookData](docs/OrderBookData.md)
 - [OrderData](docs/OrderData.md)
 - [OtherTaxes](docs/OtherTaxes.md)
 - [PlaceOrderData](docs/PlaceOrderData.md)
 - [PlaceOrderRequest](docs/PlaceOrderRequest.md)
 - [PlaceOrderResponse](docs/PlaceOrderResponse.md)
 - [PositionData](docs/PositionData.md)
 - [PostMarginResponse](docs/PostMarginResponse.md)
 - [Problem](docs/Problem.md)
 - [ProfileData](docs/ProfileData.md)
 - [ProfitAndLossChargesData](docs/ProfitAndLossChargesData.md)
 - [ProfitAndLossChargesTaxes](docs/ProfitAndLossChargesTaxes.md)
 - [ProfitAndLossChargesWrapperData](docs/ProfitAndLossChargesWrapperData.md)
 - [ProfitAndLossMetaData](docs/ProfitAndLossMetaData.md)
 - [ProfitAndLossMetaDataWrapper](docs/ProfitAndLossMetaDataWrapper.md)
 - [ProfitAndLossOtherChargesTaxes](docs/ProfitAndLossOtherChargesTaxes.md)
 - [PutCallOptionChainData](docs/PutCallOptionChainData.md)
 - [TokenRequest](docs/TokenRequest.md)
 - [TokenResponse](docs/TokenResponse.md)
 - [TradeData](docs/TradeData.md)
 - [TradeHistoryResponse](docs/TradeHistoryResponse.md)
 - [TradeHistoryResponseMetaData](docs/TradeHistoryResponseMetaData.md)
 - [TradeHistoryResponsePageData](docs/TradeHistoryResponsePageData.md)
 - [TradeHistoryResponseTradeData](docs/TradeHistoryResponseTradeData.md)
 - [TradeWiseMetaData](docs/TradeWiseMetaData.md)
 - [TradeWiseProfitAndLossData](docs/TradeWiseProfitAndLossData.md)
 - [UserFundMarginData](docs/UserFundMarginData.md)
 - [WebsocketAuthRedirectResponse](docs/WebsocketAuthRedirectResponse.md)
 - [WebsocketAuthRedirectResponseData](docs/WebsocketAuthRedirectResponseData.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/upstox/upstox-python",
    "name": "upstox-python-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Upstox Developer API",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/57/35/8b568d38933fc5113ce486b49daa666a00179881416a03067709a10b474e/upstox_python_sdk-2.9.0.tar.gz",
    "platform": null,
    "description": "# Upstox Python SDK for API v2\n\n[![PyPI](https://img.shields.io/pypi/v/upstox-python-sdk?label=upstox-python-sdk)](https://pypi.python.org/pypi/upstox-python-sdk)\n\n## Introduction\n\nThe official Python client for communicating with the <a href=\"https://upstox.com/uplink/\">Upstox API</a>.\n\nUpstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection. \n\n- API version: v2\n- Package version: 2.9.0\n- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen\n\nThis Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project.\n\n## Documentation.\n\n<a href=\"https://upstox.com/developer/api-documentation\">Upstox API Documentation</a>\n\n## Requirements.\n\nPython 2.7 and 3.4+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on Github, you can install directly from Github\n\n```sh\npip install upstox-python-sdk\n```\n(you may need to run `pip` with root permission: `sudo pip install upstox-python-sdk`)\n\nThen import the package:\n```python\nimport upstox_client \n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport upstox_client\n```\n\n## Examples\n\n[Sample Implementations](examples/) can be found within `/examples` folder.\n\n- [Websocket Market data](examples/websocket/market_data/)\n- [Websocket Order updates](examples/websocket/order_updates/)\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.upstox.com/v2/*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*ChargeApi* | [**get_brokerage**](docs/ChargeApi.md#get_brokerage) | **GET** /v2/charges/brokerage | Brokerage details\n*ChargeApi* | [**post_margin**](docs/ChargeApi.md#post_margin) | **POST** /v2/charges/margin | Calculate Margin\n*HistoryApi* | [**get_historical_candle_data**](docs/HistoryApi.md#get_historical_candle_data) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date} | Historical candle data\n*HistoryApi* | [**get_historical_candle_data1**](docs/HistoryApi.md#get_historical_candle_data1) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date}/{from_date} | Historical candle data\n*HistoryApi* | [**get_intra_day_candle_data**](docs/HistoryApi.md#get_intra_day_candle_data) | **GET** /v2/historical-candle/intraday/{instrumentKey}/{interval} | Intra day candle data\n*LoginApi* | [**authorize**](docs/LoginApi.md#authorize) | **GET** /v2/login/authorization/dialog | Authorize API\n*LoginApi* | [**logout**](docs/LoginApi.md#logout) | **DELETE** /v2/logout | Logout\n*LoginApi* | [**token**](docs/LoginApi.md#token) | **POST** /v2/login/authorization/token | Get token API\n*MarketHolidaysAndTimingsApi* | [**get_exchange_timings**](docs/MarketHolidaysAndTimingsApi.md#get_exchange_timings) | **GET** /v2/market/timings/{date} | Get Exchange Timings on particular date\n*MarketHolidaysAndTimingsApi* | [**get_holiday**](docs/MarketHolidaysAndTimingsApi.md#get_holiday) | **GET** /v2/market/holidays/{date} | Get Holiday on particular date\n*MarketHolidaysAndTimingsApi* | [**get_holidays**](docs/MarketHolidaysAndTimingsApi.md#get_holidays) | **GET** /v2/market/holidays | Get Holiday list of current year\n*MarketHolidaysAndTimingsApi* | [**get_market_status**](docs/MarketHolidaysAndTimingsApi.md#get_market_status) | **GET** /v2/market/status/{exchange} | Get Market status for particular exchange\n*MarketQuoteApi* | [**get_full_market_quote**](docs/MarketQuoteApi.md#get_full_market_quote) | **GET** /v2/market-quote/quotes | Market quotes and instruments - Full market quotes\n*MarketQuoteApi* | [**get_market_quote_ohlc**](docs/MarketQuoteApi.md#get_market_quote_ohlc) | **GET** /v2/market-quote/ohlc | Market quotes and instruments - OHLC quotes\n*MarketQuoteApi* | [**ltp**](docs/MarketQuoteApi.md#ltp) | **GET** /v2/market-quote/ltp | Market quotes and instruments - LTP quotes.\n*OptionsApi* | [**get_option_contracts**](docs/OptionsApi.md#get_option_contracts) | **GET** /v2/option/contract | Get option contracts\n*OptionsApi* | [**get_put_call_option_chain**](docs/OptionsApi.md#get_put_call_option_chain) | **GET** /v2/option/chain | Get option chain\n*OrderApi* | [**cancel_multi_order**](docs/OrderApi.md#cancel_multi_order) | **DELETE** /v2/order/multi/cancel | Cancel multi order\n*OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **DELETE** /v2/order/cancel | Cancel order\n*OrderApi* | [**exit_positions**](docs/OrderApi.md#exit_positions) | **POST** /v2/order/positions/exit | Exit all positions\n*OrderApi* | [**get_order_book**](docs/OrderApi.md#get_order_book) | **GET** /v2/order/retrieve-all | Get order book\n*OrderApi* | [**get_order_details**](docs/OrderApi.md#get_order_details) | **GET** /v2/order/history | Get order history\n*OrderApi* | [**get_order_status**](docs/OrderApi.md#get_order_status) | **GET** /v2/order/details | Get order details\n*OrderApi* | [**get_trade_history**](docs/OrderApi.md#get_trade_history) | **GET** /v2/order/trades/get-trades-for-day | Get trades\n*OrderApi* | [**get_trades_by_order**](docs/OrderApi.md#get_trades_by_order) | **GET** /v2/order/trades | Get trades for order\n*OrderApi* | [**modify_order**](docs/OrderApi.md#modify_order) | **PUT** /v2/order/modify | Modify order\n*OrderApi* | [**place_multi_order**](docs/OrderApi.md#place_multi_order) | **POST** /v2/order/multi/place | Place multi order\n*OrderApi* | [**place_order**](docs/OrderApi.md#place_order) | **POST** /v2/order/place | Place order\n*PortfolioApi* | [**convert_positions**](docs/PortfolioApi.md#convert_positions) | **PUT** /v2/portfolio/convert-position | Convert Positions\n*PortfolioApi* | [**get_holdings**](docs/PortfolioApi.md#get_holdings) | **GET** /v2/portfolio/long-term-holdings | Get Holdings\n*PortfolioApi* | [**get_positions**](docs/PortfolioApi.md#get_positions) | **GET** /v2/portfolio/short-term-positions | Get Positions\n*PostTradeApi* | [**get_trades_by_date_range**](docs/PostTradeApi.md#get_trades_by_date_range) | **GET** /v2/charges/historical-trades | Get historical trades\n*TradeProfitAndLossApi* | [**get_profit_and_loss_charges**](docs/TradeProfitAndLossApi.md#get_profit_and_loss_charges) | **GET** /v2/trade/profit-loss/charges | Get profit and loss on trades\n*TradeProfitAndLossApi* | [**get_trade_wise_profit_and_loss_data**](docs/TradeProfitAndLossApi.md#get_trade_wise_profit_and_loss_data) | **GET** /v2/trade/profit-loss/data | Get Trade-wise Profit and Loss Report Data\n*TradeProfitAndLossApi* | [**get_trade_wise_profit_and_loss_meta_data**](docs/TradeProfitAndLossApi.md#get_trade_wise_profit_and_loss_meta_data) | **GET** /v2/trade/profit-loss/metadata | Get profit and loss meta data on trades\n*UserApi* | [**get_profile**](docs/UserApi.md#get_profile) | **GET** /v2/user/profile | Get profile\n*UserApi* | [**get_user_fund_margin**](docs/UserApi.md#get_user_fund_margin) | **GET** /v2/user/get-funds-and-margin | Get User Fund And Margin\n*WebsocketApi* | [**get_market_data_feed**](docs/WebsocketApi.md#get_market_data_feed) | **GET** /v2/feed/market-data-feed | Market Data Feed\n*WebsocketApi* | [**get_market_data_feed_authorize**](docs/WebsocketApi.md#get_market_data_feed_authorize) | **GET** /v2/feed/market-data-feed/authorize | Market Data Feed Authorize\n*WebsocketApi* | [**get_portfolio_stream_feed**](docs/WebsocketApi.md#get_portfolio_stream_feed) | **GET** /v2/feed/portfolio-stream-feed | Portfolio Stream Feed\n*WebsocketApi* | [**get_portfolio_stream_feed_authorize**](docs/WebsocketApi.md#get_portfolio_stream_feed_authorize) | **GET** /v2/feed/portfolio-stream-feed/authorize | Portfolio Stream Feed Authorize\n\n## Documentation for Feeder Functions\n\nConnecting to the WebSocket for market and portfolio updates is streamlined through two primary Feeder functions:\n\n1. **MarketDataStreamer**: Offers real-time market updates, providing a seamless way to receive instantaneous information on various market instruments.\n2. **PortfolioDataStreamer**: Delivers updates related to the user's orders, enhancing the ability to track order status and portfolio changes effectively.\n\nBoth functions are designed to simplify the process of subscribing to essential data streams, ensuring users have quick and easy access to the information they need.\n\n### Detailed Explanation of Feeder Interface\n\n### MarketDataStreamer\n\nThe `MarketDataStreamer` interface is designed for effortless connection to the market WebSocket, enabling users to receive instantaneous updates on various instruments. The following example demonstrates how to quickly set up and start receiving market updates for selected instrument keys:\n\n```python\nimport upstox_client\n\ndef on_message(message):\n    print(message)\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration), [\"NSE_INDEX|Nifty 50\", \"NSE_INDEX|Nifty Bank\"], \"full\")\n\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nIn this example, you first authenticate using an access token, then instantiate MarketDataStreamer with specific instrument keys and a subscription mode. Upon connecting, the streamer listens for market updates, which are logged to the console as they arrive.\n\nFeel free to adjust the access token placeholder and any other specifics to better fit your actual implementation or usage scenario.\n\n### Exploring the MarketDataStreamer Functionality\n\n#### Modes\n- **ltpc**: ltpc provides information solely about the most recent trade, encompassing details such as the last trade price, time of the last trade, quantity traded, and the closing price from the previous day.\n- **full**: The full option offers comprehensive information, including the latest trade prices, D5 depth, 1-minute, 30-minute, and daily candlestick data, along with some additional details.\n\n#### Functions\n1. **constructor MarketDataStreamer(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full` or `ltpc`).\n2. **connect()**: Establishes the WebSocket connection.\n3. **subscribe(instrumentKeys, mode)**: Subscribes to updates for given instrument keys in the specified mode. Both parameters are mandatory.\n4. **unsubscribe(instrumentKeys)**: Stops updates for the specified instrument keys.\n5. **changeMode(instrumentKeys, mode)**: Switches the mode for already subscribed instrument keys.\n6. **disconnect()**: Ends the active WebSocket connection.\n7. **auto_reconnect(enable, interval, retryCount)**: Customizes auto-reconnect functionality. Parameters include a flag to enable/disable it, the interval(in seconds) between attempts, and the maximum number of retries.\n\n#### Events\n- **open**: Emitted upon successful connection establishment.\n- **close**: Indicates the WebSocket connection has been closed.\n- **message**: Delivers market updates.\n- **error**: Signals an error has occurred.\n- **reconnecting**: Announced when a reconnect attempt is initiated.\n- **autoReconnectStopped**: Informs when auto-reconnect efforts have ceased after exhausting the retry count.\n\nThe following documentation includes examples to illustrate the usage of these functions and events, providing a practical understanding of how to interact with the MarketDataStreamer effectively.\n\n<br/>\n\n1. Subscribing to Market Data on Connection Open with MarketDataStreamer\n\n```python\nimport upstox_client\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    def on_open():\n        streamer.subscribe(\n            [\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"], \"full\")\n\n    def on_message(message):\n        print(message)\n\n    streamer.on(\"open\", on_open)\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<br/>\n\n2. Subscribing to Instruments with Delays\n\n```python\nimport upstox_client\nimport time\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    def on_open():\n        streamer.subscribe(\n            [\"NSE_EQ|INE020B01018\"], \"full\")\n\n    # Handle incoming market data messages\\\n    def on_message(message):\n        print(message)\n\n    streamer.on(\"open\", on_open)\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\n    time.sleep(5)\n    streamer.subscribe(\n        [\"NSE_EQ|INE467B01029\"], \"full\")\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\n<br/>\n\n3. Subscribing and Unsubscribing to Instruments\n\n```python\nimport upstox_client\nimport time\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    def on_open():\n        print(\"Connected. Subscribing to instrument keys.\")\n        streamer.subscribe(\n            [\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"], \"full\")\n\n    # Handle incoming market data messages\\\n    def on_message(message):\n        print(message)\n\n    streamer.on(\"open\", on_open)\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\n    time.sleep(5)\n    print(\"Unsubscribing from instrument keys.\")\n    streamer.unsubscribe([\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"])\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<br/>\n\n4. Subscribe, Change Mode and Unsubscribe\n\n```python\nimport upstox_client\nimport time\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    def on_open():\n        print(\"Connected. Subscribing to instrument keys.\")\n        streamer.subscribe(\n            [\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"], \"full\")\n\n    # Handle incoming market data messages\\\n    def on_message(message):\n        print(message)\n\n    streamer.on(\"open\", on_open)\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\n    time.sleep(5)\n    print(\"Changing subscription mode to ltpc...\")\n    streamer.change_mode(\n        [\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"], \"ltpc\")\n\n    time.sleep(5)\n    print(\"Unsubscribing from instrument keys.\")\n    streamer.unsubscribe([\"NSE_EQ|INE020B01018\", \"NSE_EQ|INE467B01029\"])\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<br/>\n\n5. Disable Auto-Reconnect\n\n```python\nimport upstox_client\nimport time\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    def on_reconnection_halt(message):\n        print(message)\n\n    streamer.on(\"autoReconnectStopped\", on_reconnection_halt)\n\n    # Disable auto-reconnect feature\n    streamer.auto_reconnect(False)\n\n    streamer.connect()\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<br/>\n\n6. Modify Auto-Reconnect parameters\n\n```python\nimport upstox_client\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.MarketDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    # Modify auto-reconnect parameters: enable it, set interval to 10 seconds, and retry count to 3\n    streamer.auto_reconnect(True, 10, 3)\n\n    streamer.connect()\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<br/>\n\n### PortfolioDataStreamer\n\nConnecting to the Portfolio WebSocket for real-time order updates is straightforward with the PortfolioDataStreamer function. Below is a concise guide to get you started on receiving updates:\n\n```python\nimport upstox_client\n\ndef on_message(message):\n    print(message)\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    access_token = <ACCESS_TOKEN>\n    configuration.access_token = access_token\n\n    streamer = upstox_client.PortfolioDataStreamer(\n        upstox_client.ApiClient(configuration))\n\n    streamer.on(\"message\", on_message)\n\n    streamer.connect()\n\n\nif __name__ == \"__main__\":\n    main()\n```\n<br/>\n\nPosition and holding updates can be enabled by setting the corresponding flag to `True` in the constructor of the `PortfolioDataStreamer` class.\n\n```python\nimport upstox_client\nimport data_token\n\n\ndef on_message(message):\n    print(message)\n\n\ndef on_open():\n    print(\"connection opened\")\n\n\ndef main():\n    configuration = upstox_client.Configuration()\n    configuration.access_token = <ACCESS_TOKEN>\n\n    streamer = upstox_client.PortfolioDataStreamer(upstox_client.ApiClient(configuration),order_update=True,position_update=True,holding_update=True)\n\n    streamer.on(\"message\", on_message)\n    streamer.on(\"open\", on_open)\n    streamer.connect()\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\n<br/>\n\nThis example demonstrates initializing the PortfolioDataStreamer, connecting it to the WebSocket, and setting up an event listener to receive and print order updates. Replace <ACCESS_TOKEN> with your valid access token to authenticate the session.\n\n### Exploring the PortfolioDataStreamer Functionality\n\n#### Functions\n1. **constructor PortfolioDataStreamer()**: Initializes the streamer.\n2. **connect()**: Establishes the WebSocket connection.\n6. **disconnect()**: Ends the active WebSocket connection.\n7. **auto_reconnect(enable, interval, retryCount)**: Customizes auto-reconnect functionality. Parameters include a flag to enable/disable it, the interval(in seconds) between attempts, and the maximum number of retries.\n\n#### Events\n- **open**: Emitted upon successful connection establishment.\n- **close**: Indicates the WebSocket connection has been closed.\n- **message**: Delivers market updates.\n- **error**: Signals an error has occurred.\n- **reconnecting**: Announced when a reconnect attempt is initiated.\n- **autoReconnectStopped**: Informs when auto-reconnect efforts have ceased after exhausting the retry count.\n\n## Documentation For Models\n\n - [AnalyticsData](docs/AnalyticsData.md)\n - [ApiGatewayErrorResponse](docs/ApiGatewayErrorResponse.md)\n - [BatchExecutionSummary](docs/BatchExecutionSummary.md)\n - [BrokerageData](docs/BrokerageData.md)\n - [BrokerageTaxes](docs/BrokerageTaxes.md)\n - [BrokerageWrapperData](docs/BrokerageWrapperData.md)\n - [CancelOrExitMultiOrderData](docs/CancelOrExitMultiOrderData.md)\n - [CancelOrExitMultiOrderResponse](docs/CancelOrExitMultiOrderResponse.md)\n - [CancelOrExitOrderErrorData](docs/CancelOrExitOrderErrorData.md)\n - [CancelOrderData](docs/CancelOrderData.md)\n - [CancelOrderResponse](docs/CancelOrderResponse.md)\n - [ConvertPositionData](docs/ConvertPositionData.md)\n - [ConvertPositionRequest](docs/ConvertPositionRequest.md)\n - [ConvertPositionResponse](docs/ConvertPositionResponse.md)\n - [Depth](docs/Depth.md)\n - [DepthMap](docs/DepthMap.md)\n - [DpPlan](docs/DpPlan.md)\n - [ExchangeTimingData](docs/ExchangeTimingData.md)\n - [GetBrokerageResponse](docs/GetBrokerageResponse.md)\n - [GetExchangeTimingResponse](docs/GetExchangeTimingResponse.md)\n - [GetFullMarketQuoteResponse](docs/GetFullMarketQuoteResponse.md)\n - [GetHistoricalCandleResponse](docs/GetHistoricalCandleResponse.md)\n - [GetHoldingsResponse](docs/GetHoldingsResponse.md)\n - [GetHolidayResponse](docs/GetHolidayResponse.md)\n - [GetIntraDayCandleResponse](docs/GetIntraDayCandleResponse.md)\n - [GetMarketQuoteLastTradedPriceResponse](docs/GetMarketQuoteLastTradedPriceResponse.md)\n - [GetMarketQuoteOHLCResponse](docs/GetMarketQuoteOHLCResponse.md)\n - [GetMarketStatusResponse](docs/GetMarketStatusResponse.md)\n - [GetOptionChainResponse](docs/GetOptionChainResponse.md)\n - [GetOptionContractResponse](docs/GetOptionContractResponse.md)\n - [GetOrderBookResponse](docs/GetOrderBookResponse.md)\n - [GetOrderDetailsResponse](docs/GetOrderDetailsResponse.md)\n - [GetOrderResponse](docs/GetOrderResponse.md)\n - [GetPositionResponse](docs/GetPositionResponse.md)\n - [GetProfileResponse](docs/GetProfileResponse.md)\n - [GetProfitAndLossChargesResponse](docs/GetProfitAndLossChargesResponse.md)\n - [GetTradeResponse](docs/GetTradeResponse.md)\n - [GetTradeWiseProfitAndLossDataResponse](docs/GetTradeWiseProfitAndLossDataResponse.md)\n - [GetTradeWiseProfitAndLossMetaDataResponse](docs/GetTradeWiseProfitAndLossMetaDataResponse.md)\n - [GetUserFundMarginResponse](docs/GetUserFundMarginResponse.md)\n - [HistoricalCandleData](docs/HistoricalCandleData.md)\n - [HoldingsData](docs/HoldingsData.md)\n - [HolidayData](docs/HolidayData.md)\n - [Instrument](docs/Instrument.md)\n - [InstrumentData](docs/InstrumentData.md)\n - [IntraDayCandleData](docs/IntraDayCandleData.md)\n - [LogoutResponse](docs/LogoutResponse.md)\n - [Margin](docs/Margin.md)\n - [MarginData](docs/MarginData.md)\n - [MarginRequest](docs/MarginRequest.md)\n - [MarketData](docs/MarketData.md)\n - [MarketQuoteOHLC](docs/MarketQuoteOHLC.md)\n - [MarketQuoteSymbol](docs/MarketQuoteSymbol.md)\n - [MarketQuoteSymbolLtp](docs/MarketQuoteSymbolLtp.md)\n - [MarketStatusData](docs/MarketStatusData.md)\n - [ModifyOrderData](docs/ModifyOrderData.md)\n - [ModifyOrderRequest](docs/ModifyOrderRequest.md)\n - [ModifyOrderResponse](docs/ModifyOrderResponse.md)\n - [MultiOrderData](docs/MultiOrderData.md)\n - [MultiOrderError](docs/MultiOrderError.md)\n - [MultiOrderRequest](docs/MultiOrderRequest.md)\n - [MultiOrderResponse](docs/MultiOrderResponse.md)\n - [MultiOrderSummary](docs/MultiOrderSummary.md)\n - [OAuthClientException](docs/OAuthClientException.md)\n - [OAuthClientExceptionCause](docs/OAuthClientExceptionCause.md)\n - [OAuthClientExceptionCauseStackTrace](docs/OAuthClientExceptionCauseStackTrace.md)\n - [OAuthClientExceptionCauseSuppressed](docs/OAuthClientExceptionCauseSuppressed.md)\n - [Ohlc](docs/Ohlc.md)\n - [OptionStrikeData](docs/OptionStrikeData.md)\n - [OrderBookData](docs/OrderBookData.md)\n - [OrderData](docs/OrderData.md)\n - [OtherTaxes](docs/OtherTaxes.md)\n - [PlaceOrderData](docs/PlaceOrderData.md)\n - [PlaceOrderRequest](docs/PlaceOrderRequest.md)\n - [PlaceOrderResponse](docs/PlaceOrderResponse.md)\n - [PositionData](docs/PositionData.md)\n - [PostMarginResponse](docs/PostMarginResponse.md)\n - [Problem](docs/Problem.md)\n - [ProfileData](docs/ProfileData.md)\n - [ProfitAndLossChargesData](docs/ProfitAndLossChargesData.md)\n - [ProfitAndLossChargesTaxes](docs/ProfitAndLossChargesTaxes.md)\n - [ProfitAndLossChargesWrapperData](docs/ProfitAndLossChargesWrapperData.md)\n - [ProfitAndLossMetaData](docs/ProfitAndLossMetaData.md)\n - [ProfitAndLossMetaDataWrapper](docs/ProfitAndLossMetaDataWrapper.md)\n - [ProfitAndLossOtherChargesTaxes](docs/ProfitAndLossOtherChargesTaxes.md)\n - [PutCallOptionChainData](docs/PutCallOptionChainData.md)\n - [TokenRequest](docs/TokenRequest.md)\n - [TokenResponse](docs/TokenResponse.md)\n - [TradeData](docs/TradeData.md)\n - [TradeHistoryResponse](docs/TradeHistoryResponse.md)\n - [TradeHistoryResponseMetaData](docs/TradeHistoryResponseMetaData.md)\n - [TradeHistoryResponsePageData](docs/TradeHistoryResponsePageData.md)\n - [TradeHistoryResponseTradeData](docs/TradeHistoryResponseTradeData.md)\n - [TradeWiseMetaData](docs/TradeWiseMetaData.md)\n - [TradeWiseProfitAndLossData](docs/TradeWiseProfitAndLossData.md)\n - [UserFundMarginData](docs/UserFundMarginData.md)\n - [WebsocketAuthRedirectResponse](docs/WebsocketAuthRedirectResponse.md)\n - [WebsocketAuthRedirectResponseData](docs/WebsocketAuthRedirectResponseData.md)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Upstox Developer API",
    "version": "2.9.0",
    "project_urls": {
        "Homepage": "https://github.com/upstox/upstox-python"
    },
    "split_keywords": [
        "upstox",
        "developer",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57358b568d38933fc5113ce486b49daa666a00179881416a03067709a10b474e",
                "md5": "ca6300941674ca3b2c8fcab49e88db2c",
                "sha256": "bbc4faa8e3921733c38ea0b312d5cd1ce260941359e88c0f8dbc8f3cc57cc50d"
            },
            "downloads": -1,
            "filename": "upstox_python_sdk-2.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ca6300941674ca3b2c8fcab49e88db2c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 119556,
            "upload_time": "2024-10-10T14:08:38",
            "upload_time_iso_8601": "2024-10-10T14:08:38.943656Z",
            "url": "https://files.pythonhosted.org/packages/57/35/8b568d38933fc5113ce486b49daa666a00179881416a03067709a10b474e/upstox_python_sdk-2.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-10 14:08:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "upstox",
    "github_project": "upstox-python",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "upstox-python-sdk"
}
        
Elapsed time: 0.54165s