Skip to content

Commit 871eb14

Browse files
authored
Plus apis (upstox#102)
* Adding Plus APIs, Historical V3, Market Quote V3 and MTF get positions API
1 parent d807ff8 commit 871eb14

File tree

206 files changed

+4618
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+4618
-189
lines changed

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The official Python client for communicating with the <a href="https://upstox.co
99
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.
1010

1111
- API version: v2
12-
- Package version: 2.14.0
12+
- Package version: 2.15.0
1313
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
1414

1515
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project.
@@ -90,9 +90,16 @@ Class | Method | HTTP request | Description
9090
------------ | ------------- | ------------- | -------------
9191
*ChargeApi* | [**get_brokerage**](docs/ChargeApi.md#get_brokerage) | **GET** /v2/charges/brokerage | Brokerage details
9292
*ChargeApi* | [**post_margin**](docs/ChargeApi.md#post_margin) | **POST** /v2/charges/margin | Calculate Margin
93-
*HistoryApi* | [**get_historical_candle_data**](docs/HistoryApi.md#get_historical_candle_data) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date} | Historical candle data
94-
*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
95-
*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
93+
*ExpiredInstrumentApi* | [**get_expired_future_contracts**](docs/ExpiredInstrumentApi.md#get_expired_future_contracts) | **GET** /v2/expired-instruments/future/contract | Expired instruments - Get future contracts
94+
*ExpiredInstrumentApi* | [**get_expired_historical_candle_data**](docs/ExpiredInstrumentApi.md#get_expired_historical_candle_data) | **GET** /v2/expired-instruments/historical-candle/{expired_instrument_key}/{interval}/{to_date}/{from_date} | Expired Historical candle data
95+
*ExpiredInstrumentApi* | [**get_expired_option_contracts**](docs/ExpiredInstrumentApi.md#get_expired_option_contracts) | **GET** /v2/expired-instruments/option/contract | Get expired option contracts
96+
*ExpiredInstrumentApi* | [**get_expiries**](docs/ExpiredInstrumentApi.md#get_expiries) | **GET** /v2/expired-instruments/expiries | Expired instruments - Get expiries
97+
*HistoryApi* | [**get_historical_candle_data2**](docs/HistoryApi.md#get_historical_candle_data2) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date} | Historical candle data
98+
*HistoryApi* | [**get_historical_candle_data3**](docs/HistoryApi.md#get_historical_candle_data3) | **GET** /v2/historical-candle/{instrumentKey}/{interval}/{to_date}/{from_date} | Historical candle data
99+
*HistoryApi* | [**get_intra_day_candle_data1**](docs/HistoryApi.md#get_intra_day_candle_data1) | **GET** /v2/historical-candle/intraday/{instrumentKey}/{interval} | Intra day candle data
100+
*HistoryV3Api* | [**get_historical_candle_data**](docs/HistoryV3Api.md#get_historical_candle_data) | **GET** /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date} | Historical candle data
101+
*HistoryV3Api* | [**get_historical_candle_data1**](docs/HistoryV3Api.md#get_historical_candle_data1) | **GET** /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date}/{from_date} | Historical candle data
102+
*HistoryV3Api* | [**get_intra_day_candle_data**](docs/HistoryV3Api.md#get_intra_day_candle_data) | **GET** /v3/historical-candle/intraday/{instrumentKey}/{unit}/{interval} | Intra day candle data
96103
*LoginApi* | [**authorize**](docs/LoginApi.md#authorize) | **GET** /v2/login/authorization/dialog | Authorize API
97104
*LoginApi* | [**init_token_request_for_indie_user**](docs/LoginApi.md#init_token_request_for_indie_user) | **POST** /v3/login/auth/token/request/{client_id} | Init token API
98105
*LoginApi* | [**logout**](docs/LoginApi.md#logout) | **DELETE** /v2/logout | Logout
@@ -104,6 +111,9 @@ Class | Method | HTTP request | Description
104111
*MarketQuoteApi* | [**get_full_market_quote**](docs/MarketQuoteApi.md#get_full_market_quote) | **GET** /v2/market-quote/quotes | Market quotes and instruments - Full market quotes
105112
*MarketQuoteApi* | [**get_market_quote_ohlc**](docs/MarketQuoteApi.md#get_market_quote_ohlc) | **GET** /v2/market-quote/ohlc | Market quotes and instruments - OHLC quotes
106113
*MarketQuoteApi* | [**ltp**](docs/MarketQuoteApi.md#ltp) | **GET** /v2/market-quote/ltp | Market quotes and instruments - LTP quotes.
114+
*MarketQuoteV3Api* | [**get_ltp**](docs/MarketQuoteV3Api.md#get_ltp) | **GET** /v3/market-quote/ltp | Market quotes and instruments - LTP quotes.
115+
*MarketQuoteV3Api* | [**get_market_quote_ohlc**](docs/MarketQuoteV3Api.md#get_market_quote_ohlc) | **GET** /v3/market-quote/ohlc | Market quotes and instruments - OHLC quotes
116+
*MarketQuoteV3Api* | [**get_market_quote_option_greek**](docs/MarketQuoteV3Api.md#get_market_quote_option_greek) | **GET** /v3/market-quote/option-greek | Market quotes and instruments - Option Greek
107117
*OptionsApi* | [**get_option_contracts**](docs/OptionsApi.md#get_option_contracts) | **GET** /v2/option/contract | Get option contracts
108118
*OptionsApi* | [**get_put_call_option_chain**](docs/OptionsApi.md#get_put_call_option_chain) | **GET** /v2/option/chain | Get option chain
109119
*OrderApi* | [**cancel_multi_order**](docs/OrderApi.md#cancel_multi_order) | **DELETE** /v2/order/multi/cancel | Cancel multi order
@@ -119,6 +129,7 @@ Class | Method | HTTP request | Description
119129
*OrderApi* | [**place_order**](docs/OrderApi.md#place_order) | **POST** /v2/order/place | Place order
120130
*PortfolioApi* | [**convert_positions**](docs/PortfolioApi.md#convert_positions) | **PUT** /v2/portfolio/convert-position | Convert Positions
121131
*PortfolioApi* | [**get_holdings**](docs/PortfolioApi.md#get_holdings) | **GET** /v2/portfolio/long-term-holdings | Get Holdings
132+
*PortfolioApi* | [**get_mtf_positions**](docs/PortfolioApi.md#get_mtf_positions) | **GET** /v3/portfolio/mtf-positions | Get MTF positions
122133
*PortfolioApi* | [**get_positions**](docs/PortfolioApi.md#get_positions) | **GET** /v2/portfolio/short-term-positions | Get Positions
123134
*PostTradeApi* | [**get_trades_by_date_range**](docs/PostTradeApi.md#get_trades_by_date_range) | **GET** /v2/charges/historical-trades | Get historical trades
124135
*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
@@ -186,9 +197,10 @@ Feel free to adjust the access token placeholder and any other specifics to bett
186197
- **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.
187198
- **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.
188199
- **option_greeks**: Contains only option greeks.
200+
- **full_d30**: full_d30 includes Full mode data plus 30 market level quotes.
189201

190202
#### Functions
191-
1. **constructor MarketDataStreamerV3(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full`, `ltpc` or `option_greeks`).
203+
1. **constructor MarketDataStreamerV3(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full`, `ltpc`, `option_greeks` or `full_d30`).
192204
2. **connect()**: Establishes the WebSocket connection.
193205
3. **subscribe(instrumentKeys, mode)**: Subscribes to updates for given instrument keys in the specified mode. Both parameters are mandatory.
194206
4. **unsubscribe(instrumentKeys)**: Stops updates for the specified instrument keys.
@@ -809,15 +821,22 @@ if __name__ == "__main__":
809821
- [DepthMap](docs/DepthMap.md)
810822
- [DpPlan](docs/DpPlan.md)
811823
- [ExchangeTimingData](docs/ExchangeTimingData.md)
824+
- [ExpiredFutureData](docs/ExpiredFutureData.md)
812825
- [GetBrokerageResponse](docs/GetBrokerageResponse.md)
813826
- [GetExchangeTimingResponse](docs/GetExchangeTimingResponse.md)
827+
- [GetExpiredFuturesContractResponse](docs/GetExpiredFuturesContractResponse.md)
828+
- [GetExpiriesResponse](docs/GetExpiriesResponse.md)
814829
- [GetFullMarketQuoteResponse](docs/GetFullMarketQuoteResponse.md)
830+
- [GetGttOrderResponse](docs/GetGttOrderResponse.md)
815831
- [GetHistoricalCandleResponse](docs/GetHistoricalCandleResponse.md)
816832
- [GetHoldingsResponse](docs/GetHoldingsResponse.md)
817833
- [GetHolidayResponse](docs/GetHolidayResponse.md)
818834
- [GetIntraDayCandleResponse](docs/GetIntraDayCandleResponse.md)
819835
- [GetMarketQuoteLastTradedPriceResponse](docs/GetMarketQuoteLastTradedPriceResponse.md)
836+
- [GetMarketQuoteLastTradedPriceResponseV3](docs/GetMarketQuoteLastTradedPriceResponseV3.md)
820837
- [GetMarketQuoteOHLCResponse](docs/GetMarketQuoteOHLCResponse.md)
838+
- [GetMarketQuoteOHLCResponseV3](docs/GetMarketQuoteOHLCResponseV3.md)
839+
- [GetMarketQuoteOptionGreekResponseV3](docs/GetMarketQuoteOptionGreekResponseV3.md)
821840
- [GetMarketStatusResponse](docs/GetMarketStatusResponse.md)
822841
- [GetOptionChainResponse](docs/GetOptionChainResponse.md)
823842
- [GetOptionContractResponse](docs/GetOptionContractResponse.md)
@@ -831,6 +850,13 @@ if __name__ == "__main__":
831850
- [GetTradeWiseProfitAndLossDataResponse](docs/GetTradeWiseProfitAndLossDataResponse.md)
832851
- [GetTradeWiseProfitAndLossMetaDataResponse](docs/GetTradeWiseProfitAndLossMetaDataResponse.md)
833852
- [GetUserFundMarginResponse](docs/GetUserFundMarginResponse.md)
853+
- [GttCancelOrderRequest](docs/GttCancelOrderRequest.md)
854+
- [GttModifyOrderRequest](docs/GttModifyOrderRequest.md)
855+
- [GttOrderData](docs/GttOrderData.md)
856+
- [GttOrderDetails](docs/GttOrderDetails.md)
857+
- [GttPlaceOrderRequest](docs/GttPlaceOrderRequest.md)
858+
- [GttRule](docs/GttRule.md)
859+
- [GttTriggerOrderResponse](docs/GttTriggerOrderResponse.md)
834860
- [HistoricalCandleData](docs/HistoricalCandleData.md)
835861
- [HoldingsData](docs/HoldingsData.md)
836862
- [HolidayData](docs/HolidayData.md)
@@ -846,8 +872,11 @@ if __name__ == "__main__":
846872
- [MarginRequest](docs/MarginRequest.md)
847873
- [MarketData](docs/MarketData.md)
848874
- [MarketQuoteOHLC](docs/MarketQuoteOHLC.md)
875+
- [MarketQuoteOHLCV3](docs/MarketQuoteOHLCV3.md)
876+
- [MarketQuoteOptionGreekV3](docs/MarketQuoteOptionGreekV3.md)
849877
- [MarketQuoteSymbol](docs/MarketQuoteSymbol.md)
850878
- [MarketQuoteSymbolLtp](docs/MarketQuoteSymbolLtp.md)
879+
- [MarketQuoteSymbolLtpV3](docs/MarketQuoteSymbolLtpV3.md)
851880
- [MarketStatusData](docs/MarketStatusData.md)
852881
- [ModifyOrderData](docs/ModifyOrderData.md)
853882
- [ModifyOrderRequest](docs/ModifyOrderRequest.md)
@@ -864,6 +893,7 @@ if __name__ == "__main__":
864893
- [OAuthClientExceptionCauseStackTrace](docs/OAuthClientExceptionCauseStackTrace.md)
865894
- [OAuthClientExceptionCauseSuppressed](docs/OAuthClientExceptionCauseSuppressed.md)
866895
- [Ohlc](docs/Ohlc.md)
896+
- [OhlcV3](docs/OhlcV3.md)
867897
- [OptionStrikeData](docs/OptionStrikeData.md)
868898
- [OrderBookData](docs/OrderBookData.md)
869899
- [OrderData](docs/OrderData.md)
@@ -885,6 +915,7 @@ if __name__ == "__main__":
885915
- [ProfitAndLossMetaDataWrapper](docs/ProfitAndLossMetaDataWrapper.md)
886916
- [ProfitAndLossOtherChargesTaxes](docs/ProfitAndLossOtherChargesTaxes.md)
887917
- [PutCallOptionChainData](docs/PutCallOptionChainData.md)
918+
- [Rule](docs/Rule.md)
888919
- [TokenRequest](docs/TokenRequest.md)
889920
- [TokenResponse](docs/TokenResponse.md)
890921
- [TradeData](docs/TradeData.md)

docs/ChargeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# upstox_client.ChargeApi
22

3-
All URIs are relative to *https://api-v2.upstox.com*
3+
All URIs are relative to *https://api.upstox.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------

docs/ExpiredFutureData.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ExpiredFutureData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **str** | Name of the instrument | [optional]
7+
**segment** | **str** | Segment of the instrument | [optional]
8+
**exchange** | **str** | Exchange of the instrument | [optional]
9+
**expiry** | **str** | Expiry date of the instrument | [optional]
10+
**instrument_key** | **str** | Unique key identifying the instrument | [optional]
11+
**exchange_token** | **str** | Token assigned by the exchange | [optional]
12+
**trading_symbol** | **str** | Symbol used for trading | [optional]
13+
**tick_size** | **float** | Minimum price movement | [optional]
14+
**lot_size** | **int** | Number of units per lot | [optional]
15+
**instrument_type** | **str** | Type of the instrument | [optional]
16+
**freeze_quantity** | **float** | Maximum allowed quantity | [optional]
17+
**underlying_key** | **str** | Key of the underlying asset | [optional]
18+
**underlying_type** | **str** | Type of the underlying asset | [optional]
19+
**underlying_symbol** | **str** | Symbol of the underlying asset | [optional]
20+
**minimum_lot** | **int** | Minimum lot size | [optional]
21+
22+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
23+

0 commit comments

Comments
 (0)