Skip to content

Commit ff88409

Browse files
authored
Merge pull request upstox#81 from upstox/multi-order-apis
Add new multi orders apis and SDK headers
2 parents cd141a7 + 7fc66c6 commit ff88409

39 files changed

+3010
-4
lines changed

README.md

Lines changed: 13 additions & 1 deletion
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.7.0
12+
- Package version: 2.8.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.
@@ -81,13 +81,16 @@ Class | Method | HTTP request | Description
8181
*MarketQuoteApi* | [**ltp**](docs/MarketQuoteApi.md#ltp) | **GET** /v2/market-quote/ltp | Market quotes and instruments - LTP quotes.
8282
*OptionsApi* | [**get_option_contracts**](docs/OptionsApi.md#get_option_contracts) | **GET** /v2/option/contract | Get option contracts
8383
*OptionsApi* | [**get_put_call_option_chain**](docs/OptionsApi.md#get_put_call_option_chain) | **GET** /v2/option/chain | Get option chain
84+
*OrderApi* | [**cancel_multi_order**](docs/OrderApi.md#cancel_multi_order) | **DELETE** /v2/order/multi/cancel | Cancel multi order
8485
*OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **DELETE** /v2/order/cancel | Cancel order
86+
*OrderApi* | [**exit_positions**](docs/OrderApi.md#exit_positions) | **POST** /v2/order/positions/exit | Exit all positions
8587
*OrderApi* | [**get_order_book**](docs/OrderApi.md#get_order_book) | **GET** /v2/order/retrieve-all | Get order book
8688
*OrderApi* | [**get_order_details**](docs/OrderApi.md#get_order_details) | **GET** /v2/order/history | Get order history
8789
*OrderApi* | [**get_order_status**](docs/OrderApi.md#get_order_status) | **GET** /v2/order/details | Get order details
8890
*OrderApi* | [**get_trade_history**](docs/OrderApi.md#get_trade_history) | **GET** /v2/order/trades/get-trades-for-day | Get trades
8991
*OrderApi* | [**get_trades_by_order**](docs/OrderApi.md#get_trades_by_order) | **GET** /v2/order/trades | Get trades for order
9092
*OrderApi* | [**modify_order**](docs/OrderApi.md#modify_order) | **PUT** /v2/order/modify | Modify order
93+
*OrderApi* | [**place_multi_order**](docs/OrderApi.md#place_multi_order) | **POST** /v2/order/multi/place | Place multi order
9194
*OrderApi* | [**place_order**](docs/OrderApi.md#place_order) | **POST** /v2/order/place | Place order
9295
*PortfolioApi* | [**convert_positions**](docs/PortfolioApi.md#convert_positions) | **PUT** /v2/portfolio/convert-position | Convert Positions
9396
*PortfolioApi* | [**get_holdings**](docs/PortfolioApi.md#get_holdings) | **GET** /v2/portfolio/long-term-holdings | Get Holdings
@@ -470,9 +473,13 @@ This example demonstrates initializing the PortfolioDataStreamer, connecting it
470473

471474
- [AnalyticsData](docs/AnalyticsData.md)
472475
- [ApiGatewayErrorResponse](docs/ApiGatewayErrorResponse.md)
476+
- [BatchExecutionSummary](docs/BatchExecutionSummary.md)
473477
- [BrokerageData](docs/BrokerageData.md)
474478
- [BrokerageTaxes](docs/BrokerageTaxes.md)
475479
- [BrokerageWrapperData](docs/BrokerageWrapperData.md)
480+
- [CancelOrExitMultiOrderData](docs/CancelOrExitMultiOrderData.md)
481+
- [CancelOrExitMultiOrderResponse](docs/CancelOrExitMultiOrderResponse.md)
482+
- [CancelOrExitOrderErrorData](docs/CancelOrExitOrderErrorData.md)
476483
- [CancelOrderData](docs/CancelOrderData.md)
477484
- [CancelOrderResponse](docs/CancelOrderResponse.md)
478485
- [ConvertPositionData](docs/ConvertPositionData.md)
@@ -522,6 +529,11 @@ This example demonstrates initializing the PortfolioDataStreamer, connecting it
522529
- [ModifyOrderData](docs/ModifyOrderData.md)
523530
- [ModifyOrderRequest](docs/ModifyOrderRequest.md)
524531
- [ModifyOrderResponse](docs/ModifyOrderResponse.md)
532+
- [MultiOrderData](docs/MultiOrderData.md)
533+
- [MultiOrderError](docs/MultiOrderError.md)
534+
- [MultiOrderRequest](docs/MultiOrderRequest.md)
535+
- [MultiOrderResponse](docs/MultiOrderResponse.md)
536+
- [MultiOrderSummary](docs/MultiOrderSummary.md)
525537
- [OAuthClientException](docs/OAuthClientException.md)
526538
- [OAuthClientExceptionCause](docs/OAuthClientExceptionCause.md)
527539
- [OAuthClientExceptionCauseStackTrace](docs/OAuthClientExceptionCauseStackTrace.md)

docs/BatchExecutionSummary.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# BatchExecutionSummary
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **int** | The total number of order lines present in the payload. | [optional]
7+
**success** | **int** | The number of order lines that were successfully placed without any errors. | [optional]
8+
**error** | **int** | The number of order lines that encountered errors during processing, despite their payloads being valid. | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+

docs/CancelOrExitMultiOrderData.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CancelOrExitMultiOrderData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**order_ids** | **list[str]** | Reference order IDs | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CancelOrExitMultiOrderResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**status** | **str** | | [optional]
7+
**data** | [**CancelOrExitMultiOrderData**](CancelOrExitMultiOrderData.md) | | [optional]
8+
**errors** | [**list[CancelOrExitOrderErrorData]**](CancelOrExitOrderErrorData.md) | Error data for cancel or exit order request | [optional]
9+
**summary** | [**BatchExecutionSummary**](BatchExecutionSummary.md) | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+

docs/CancelOrExitOrderErrorData.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CancelOrExitOrderErrorData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**error_code** | **str** | Unique code for the error state | [optional]
7+
**message** | **str** | Verbose message for the error state | [optional]
8+
**property_path** | **str** | Path to property failing validation | [optional]
9+
**invalid_value** | **object** | Invalid value for the property failing validation | [optional]
10+
**error_code** | **str** | | [optional]
11+
**property_path** | **str** | | [optional]
12+
**invalid_value** | **object** | | [optional]
13+
**instrument_key** | **str** | Key of instrument | [optional]
14+
**order_id** | **str** | Reference order ID | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+

docs/MultiOrderData.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# MultiOrderData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**correlation_id** | **str** | A unique identifier for tracking individual orders within the batch | [optional]
7+
**order_id** | **str** | An order ID for the order request placed | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

docs/MultiOrderError.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# MultiOrderError
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**error_code** | **str** | Unique code for the error state | [optional]
7+
**message** | **str** | Verbose message for the error state | [optional]
8+
**property_path** | **str** | Path to property failing validation | [optional]
9+
**invalid_value** | **object** | Invalid value for the property failing validation | [optional]
10+
**error_code** | **str** | | [optional]
11+
**property_path** | **str** | | [optional]
12+
**invalid_value** | **object** | | [optional]
13+
**correlation_id** | **str** | A unique identifier for tracking individual orders within the batch | [optional]
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+

docs/MultiOrderRequest.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MultiOrderRequest
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**quantity** | **int** | Quantity with which the order is to be placed |
7+
**product** | **str** | Signifies if the order was either Intraday, Delivery, CO or OCO |
8+
**validity** | **str** | It can be one of the following - DAY(default), IOC |
9+
**price** | **float** | Price at which the order will be placed |
10+
**tag** | **str** | | [optional]
11+
**slice** | **bool** | To divide the order line based on predefined exchange definitions |
12+
**instrument_token** | **str** | Key of the instrument |
13+
**order_type** | **str** | Type of order. It can be one of the following MARKET refers to market order LIMIT refers to Limit Order SL refers to Stop Loss Limit SL-M refers to Stop Loss Market |
14+
**transaction_type** | **str** | Indicates whether its a buy or sell order |
15+
**disclosed_quantity** | **int** | The quantity that should be disclosed in the market depth |
16+
**trigger_price** | **float** | If the order is a stop loss order then the trigger price to be set is mentioned here |
17+
**is_amo** | **bool** | Signifies if the order is an After Market Order |
18+
**correlation_id** | **str** | A unique identifier for tracking individual orders within the batch |
19+
20+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
21+

docs/MultiOrderResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# MultiOrderResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**status** | **str** | | [optional]
7+
**data** | [**list[MultiOrderData]**](MultiOrderData.md) | Response data for multi order request | [optional]
8+
**errors** | [**list[MultiOrderError]**](MultiOrderError.md) | Error details for multi order request | [optional]
9+
**summary** | [**MultiOrderSummary**](MultiOrderSummary.md) | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+

docs/MultiOrderSummary.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# MultiOrderSummary
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **int** | The total number of order lines present in the payload. | [optional]
7+
**success** | **int** | The number of order lines that were successfully placed without any errors. | [optional]
8+
**error** | **int** | The number of order lines that encountered errors during processing, despite their payloads being valid. | [optional]
9+
**payload_error** | **int** | The number of order lines with payload errors, indicating formatting or data validity issues.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note&lt;/b&gt;: Orders are processed only if the entire batch is free of payload_error, ensuring error-free transactions. | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+

0 commit comments

Comments
 (0)