All URIs are relative to https://tradeapi.kotaksecurities.com/apim
Method | Description |
---|---|
positions | Get's positions. |
object positions(position_type)
Get's positions.
Return positions of provided position type.
from ks_api_client import ks_api
client = ks_api.KSTradeApi(access_token = "access_token", userid = "userid", \
consumer_key = "consumer_key", ip = "IP", app_id = "app_id")
#First initialize session and generate session token
try:
# Get's position by position_type.
client.positions(position_type = "TODAYS")
except Exception as e:
print("Exception when calling PositionsApi->positions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
position_type | str | Type of position - TODAYS, STOCKS, OPEN |
object
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Gets the Positoin data for a client account. | - |
400 | Invalid or missing input parameters | - |
403 | Invalid session, please re-login to continue | - |
429 | Too many requests to the API | - |
500 | Unexpected error | - |
502 | Not able to communicate with OMS | - |
503 | Trade API service is unavailable | - |
504 | Gateway timeout, trade API is unreachable | - |