Skip to Main Content
POST/NorenWClientAPI/GetPendingGTTOrder

Get Pending GTT Orders

Fetch GTT orders that have been placed but whose trigger condition hasn't fired yet.

API Endpoint

MethodPOST
URLhttps://api.shoonya.com/NorenWClientAPI/GetPendingGTTOrder
Content-Typeapplication/x-www-form-urlencoded
PayloadjData=<JSON payload>&jKey=<AccessToken>
Response shape unconfirmed for multiple ordersThe sample response is a single order object, not an array. Confirm with a live call whether multiple pending GTT orders come back as a list — don't assume the array shape shown for Get Enabled GTT Orders applies here.

Parameters

FieldTypeRequiredDescription
uidstringRequiredUser 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/GetPendingGTTOrder",
    data=data,
)
print(response.json())
const payload = { uid: "AB1234" };
const data = `jData=${JSON.stringify(payload)}&jKey=${accessToken}`;

const res = await fetch("https://api.shoonya.com/NorenWClientAPI/GetPendingGTTOrder", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: data,
});
console.log(await res.json());
curl -X POST https://api.shoonya.com/NorenWClientAPI/GetPendingGTTOrder \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'jData={"uid":"AB1234"}' \
  --data-urlencode "jKey=$ACCESS_TOKEN"

Response

json
// Success
{
  "stat": "OK",
  "ai_t": "LTP_A",
  "al_id": "210415000000002",
  "tsym": "ACC-EQ",
  "exch": "NSE",
  "token": "22",
  "Remarks": "test",
  "validity": "DAY",
  "actid": "MDHINIT",
  "trantype": "B",
  "prctyp": "LMT",
  "qty": 1,
  "prc": "1305.00",
  "prd": "C",
  "ordersource": "MOB",
  "d": "1900.00"
}

// Failure
{
  "stat": "Not_Ok",
  "emsg": "Session Expired : Invalid Session Key"
}
FieldDescription
statSuccess/failure indication.
al_idAlert ID of this pending GTT order.
ai_tAlert type the trigger is evaluated against.
tsym / exch / tokenSymbol, exchange segment, and contract token.
validity / dTrigger validity and the LTP comparison value.
trantype / prctyp / prd / qty / prcThe order parameters that will be submitted once triggered — same meanings as in Place GTT Order.
emsgPresent only on failure.

Best Practices

  • Poll this endpoint periodically (or on reconnect) rather than relying purely on local state — it's your source of truth for which GTT orders are still dormant versus already triggered or cancelled.
  • Confirm the exact response shape with a live account holding 2+ pending GTT orders before writing parsing code — the documented sample shows only a single order object, and this doc doesn't confirm whether multiple orders come back as an array or as repeated top-level fields.
  • Cross-reference al_id values here against your own local record of orders you placed via Place GTT Order to detect any GTT orders that triggered (and therefore disappeared from this list) since your last check.