Skip to Main Content
POST/NorenWClientAPI/GetQuotes

Get Quotes

Fetch a single, current snapshot of price, OHLC, circuit limits and top-of-book for one instrument by exchange + token.

API Endpoint

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

Overview

GetQuotes returns a one-shot snapshot for a single scrip — last traded price, today's OHLC, upper/lower circuit, 52-week range, and best bid/offer (depth level 1 only). It does not stream; each call returns the state at that instant.

Purpose

Use this for on-demand lookups — e.g. showing a quote before order placement, or a periodic poll for a watchlist row. For anything that needs continuous updates (option chains, live tickers, tick-by-tick charts), subscribe via Subscribe to Market Feed instead of polling this endpoint in a loop — polling at low intervals will burn into your rate limits fast.

Parameters

FieldTypeRequiredDescription
uidstringrequiredYour account/client ID.
exchstringrequiredExchange segment, e.g. NSE, NFO, BSE, MCX.
tokenstringrequiredNumeric instrument token for the scrip. Look this up via Search Scrip or the Symbol Master — don't hardcode tokens, they can change on contract rollover.

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/GetQuotes",
                      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/GetQuotes", {
  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/GetQuotes \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'jData={"uid":"ABC1234","exch":"NSE","token":"22"}' \
  --data-urlencode "jKey=$Acesstoken"

Response example

json
{
  "stat": "Ok",
  "exch": "NSE",
  "tsym": "ACC-EQ",
  "cname": "ACC LIMITED",
  "token": "22",
  "lp": "1362.80",
  "c": "1378.40",
  "o": "1370.00",
  "h": "1373.90",
  "l": "1360.00",
  "ap": "1366.64",
  "v": "160343",
  "uc": "1635.30",
  "lc": "1090.30",
  "wk52_h": "1987.00",
  "wk52_l": "1251.70",
  "bp1": "1362.80", "sp1": "0.00",
  "bq1": "2",       "sq1": "0",
  "ltt": "15:29:55",
  "ltd": "07-08-2026"
}

Error handling

CodeMeaning
Invalid_InputToken doesn't exist on the given exchange segment — usually a stale token after a contract rollover or corporate action.
Session_ExpiredAccess token expired or invalid — re-authenticate via Token Renewal.

Best practices

  • Fields are all strings, including numeric ones (lp, v, etc.) — cast explicitly before doing arithmetic.
  • bp1/sp1 and bq1/sq1 are level-1 depth only.
  • A sp1/bp1 of 0.00 means no resting order at that side, not a zero price — don't treat it as tradeable.

Python example

python
from shoonya_api import ShoonyaClient

client = ShoonyaClient(session_token=Acesstoken)
q = client.get_quotes(exchange="NSE", token="22")
print(f"{q.tsym}: LTP {q.lp}  Day range {q.l}-{q.h}")

Notes

ltt/ltd reflect the last trade time/date on the exchange, which can lag behind request_time during low-liquidity periods — a stale ltt doesn't mean the call failed, it means the scrip simply hasn't traded recently.