All URIs are relative to https://tradeapi.kotaksecurities.com/apim
Method | Description |
---|---|
quote | Get's Quotes. |
object quote(instrument_token, quote_type)
Get Quote Details
Returns full quote details in case quote_type is not provided else returns quote details of provided quote_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 full quote details
client.quote(instrument_token = 110)
# Get quote details by quote_type
client.quote(instrument_token = 110, quote_type = "LTP")
except Exception as e:
print("Exception when calling QuoteApi->quote_details: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instrument_token | str | ||
quote_type | str | Type of Quote details - LTP, DEPTH, OHLC | [optional] |
object
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Quote fetched successfully | - |
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 | - |