Skip to Main Content
POST/NorenWClientAPI/GetSecurityInfo

Security Info

Fetch contract master details for a single instrument — tick size, lot size, price bands, margin percentages, and identifiers — given its exchange and token.

API Endpoint

MethodPOST
URLhttps://api.shoonya.com/NorenWClientAPI/GetSecurityInfo
Content-Typeapplication/x-www-form-urlencoded
PayloadjData=<JSON payload>&jKey=<AccessToken> — requires a valid AccessToken from Login.

Overview

GetSecurityInfo returns the static contract master record for a single token on a given exch — the same reference data (tick size, lot size, price bands, margin rates) that backs order validation and margin calculation. It's a lookup by token, not by name; resolve a symbol to its token first via Search Scrip or the Symbol Master.

Purpose

Use this to validate price/quantity inputs before placing an order (tick size ti, lot size ls, freeze quantity frzqty), to read the day's circuit limits (uc/lc), or to pull margin parameters (delmrg, varmrg, elmmrg, hair_cut) for a pre-trade risk check. Because this is per-token reference data rather than a live quote, cache it for the session instead of calling it on every order.

Parameters

FieldTypeRequiredDescription
uidstringrequiredYour account/client ID.
exchstringrequiredExchange segment, e.g. NSE, NFO, BSE, MCX.
tokenstringrequiredNumeric instrument token, as returned by Search Scrip or the Symbol Master.

Request example

import requests
import json

jdata = {"uid": "ABC1234", "exch": "NSE", "token": "22"}
payload = "jData=" + json.dumps(jdata) + "&jKey=" + Acesstoken

headers = {"Content-Type": "application/x-www-form-urlencoded"}
resp = requests.post("https://api.shoonya.com/NorenWClientAPI/GetSecurityInfo",
                      data=payload, headers=headers)
print(resp.json())
const jdata = { uid: "ABC1234", exch: "NSE", token: "22" };
const payload = "jData=" + JSON.stringify(jdata) + "&jKey=" + Acesstoken;

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

Response example

json
{
  "request_time": "17:58:21 11-08-2026",
  "stat": "Ok",
  "exch": "NSE",
  "tsym": "ACC-EQ",
  "cname": "ACC LIMITED",
  "symname": "ACC",
  "seg": "EQT",
  "instname": "EQ",
  "isin": "INE012A01025",
  "pp": "2",
  "prcftr": "1.000000",
  "ls": "1",
  "ti": "0.10",
  "mult": "1",
  "issue_d": "24-10-1994",
  "uc": "1607.70",
  "lc": "1071.90",
  "prcftr_d": "(1 / 1 ) * (1 / 1)",
  "token": "22",
  "frzqty": "73612",
  "delmrg": "75.00",
  "varmrg": "20.00",
  "elmmrg": "0.00",
  "hair_cut": "9.70",
  "sip_ind": "2"
}

Error handling

ResponseMeaning
{"stat":"Not_Ok","emsg":"..."}Token not found on the given exch — usually a stale or wrong token; re-resolve it via Search Scrip rather than assuming the token is permanent.
Session_ExpiredAccess token expired or invalid — re-authenticate via Token Renewal.

Best practices

  • Cache the response per token for the trading session — this is contract master data, not a live quote, and won't change intraday.
  • Read uc/lc (upper/lower circuit) and ti/ls (tick/lot size) before submitting an order for that token to avoid a preventable rejection.
  • Margin fields (delmrg, varmrg, elmmrg, hair_cut) are percentages, not absolute values — combine with the current price for an actual margin figure.

Python example

python
from shoonya_api import ShoonyaClient

client = ShoonyaClient(session_token=Acesstoken)
info = client.get_security_info(exchange="NSE", token="22")
print(info.tsym, info.tick_size, info.lot_size, info.upper_circuit, info.lower_circuit)

Notes

Prefer resolving token from Search Scrip or the Symbol Master rather than hardcoding it — tokens are exchange-assigned and can be reused or reassigned across corporate actions over long time horizons, so a token cached from a previous session should be revalidated periodically rather than treated as permanent.