All URIs are relative to https://api-v2.upstox.com
Method | HTTP request | Description |
---|---|---|
cancel_order | DELETE /v3/order/cancel | |
modify_order | PUT /v3/order/modify | |
place_order | POST /v3/order/place |
GttTriggerOrderResponse cancel_gtt_order(body)
Cancel GTT order
This API allows you to cancel GTT orders.
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.OrderApiV3(upstox_client.ApiClient(configuration))
body = upstox_client.GttCancelOrderRequest() # GttCancelOrderRequest |
try:
# Cancel GTT order
api_response = api_instance.cancel_gtt_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->cancel_gtt_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | GttCancelOrderRequest |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CancelOrderV3Response cancel_order(order_id)
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.OrderApiV3()
order_id = 'order_id_example' # str |
try:
api_response = api_instance.cancel_order(order_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->cancel_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
order_id | str |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetGttOrderResponse get_gtt_order_details(gtt_order_id=gtt_order_id)
Get GTT order details
GTT_ORDER_DESCRIPTION
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.OrderApiV3(upstox_client.ApiClient(configuration))
gtt_order_id = 'gtt_order_id_example' # str | Unique identifier of the GTT order for which the order history is required (optional)
try:
# Get GTT order details
api_response = api_instance.get_gtt_order_details(gtt_order_id=gtt_order_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->get_gtt_order_details: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
gtt_order_id | str | Unique identifier of the GTT order for which the order history is required | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GttTriggerOrderResponse modify_gtt_order(body)
Modify GTT order
This API allows you to modify GTT orders.
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.OrderApiV3(upstox_client.ApiClient(configuration))
body = upstox_client.GttModifyOrderRequest() # GttModifyOrderRequest |
try:
# Modify GTT order
api_response = api_instance.modify_gtt_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->modify_gtt_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | GttModifyOrderRequest |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModifyOrderV3Response modify_order(body)
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.OrderApiV3()
body = upstox_client.ModifyOrderRequest() # ModifyOrderRequest |
try:
api_response = api_instance.modify_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->modify_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ModifyOrderRequest |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GttTriggerOrderResponse place_gtt_order(body)
Place GTT order
This API allows you to place GTT orders.
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.OrderApiV3(upstox_client.ApiClient(configuration))
body = upstox_client.GttPlaceOrderRequest() # GttPlaceOrderRequest |
try:
# Place GTT order
api_response = api_instance.place_gtt_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->place_gtt_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | GttPlaceOrderRequest |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PlaceOrderV3Response place_order(body)
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.OrderApiV3()
body = upstox_client.PlaceOrderV3Request() # PlaceOrderV3Request |
try:
api_response = api_instance.place_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrderApiV3->place_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | PlaceOrderV3Request |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]