Naming vs. behaviorThe endpoint name says "GTTs" but the response is a list of enabled alert types (ai_t values), used by both Place GTT Order and Set Alert — it does not return your pending GTT orders (that's Get Pending GTT Order). This same endpoint is what "Get Enabled Alert Types" refers to in the Alerts section.
Parameters
Field
Type
Required
Description
uid
string
Required
User ID of the logged-in user.
Request Examples
import requests, json
payload = {"uid": "AB1234"}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
response = requests.post(
"https://api.shoonya.com/NorenWClientAPI/GetEnabledGTTs",
data=data,
)
result = response.json()
alert_types = [row["ai_t"] for row in result.get("ai_ts", [])]
print("Enabled alert types:", alert_types)
Array of { ai_t } objects — the alert types your account can use in Place GTT Order and Set Alert.
emsg
Present only on failure.
Best Practices
Cache the result rather than calling this before every Place GTT Order / Set Alert call — enabled alert types change rarely, if ever, for a given account.
Validate any hardcoded ai_t constant (like "LTP") against this endpoint at startup rather than assuming it's always enabled — account-level differences are the whole reason this call exists.
Don't confuse this with a list of your own live GTT orders — for that, use Get Pending GTT Order instead.
API Endpoint
POSThttps://api.shoonya.com/NorenWClientAPI/GetEnabledGTTsapplication/x-www-form-urlencodedjData=<JSON payload>&jKey=<AccessToken>ai_tvalues), used by both Place GTT Order and Set Alert — it does not return your pending GTT orders (that's Get Pending GTT Order). This same endpoint is what "Get Enabled Alert Types" refers to in the Alerts section.Parameters
Request Examples
Response
OKorNot_Ok.{ ai_t }objects — the alert types your account can use in Place GTT Order and Set Alert.Best Practices
ai_tconstant (like"LTP") against this endpoint at startup rather than assuming it's always enabled — account-level differences are the whole reason this call exists.