Skip to Main Content
POST/NorenWClientAPI/GetQuotes

Market Quotes (LTP / OHLC)

Fetch the latest traded price, OHLC, and best bid/ask for one or more instruments.

Overview

Market Quotes returns a snapshot of the current LTP (last traded price), the day's OHLC, and top-of-book bid/ask for a given instrument — a single-shot read, not a stream.

Purpose

Use this for on-demand price checks — displaying a quote in a UI, or a strategy's initial price read at startup. For continuous prices, subscribe to Subscribe to Market Feed over WebSocket instead; polling this endpoint in a loop will burn through your rate limit.

Parameters

FieldTypeRequiredDescription
exchstringrequiredExchange segment code.
tokenstringrequiredInstrument token from Instrument Master.

Request example

import requests

params = {"uid":"ABC123"exch": "NSE", "token": "2885"}
headers = {"Authorization": f"Bearer {Acesstoken}"}

resp = requests.get(
    "https://api.shoonya.com/NorenWClientAPI/GetQuotes",
    params=params, headers=headers,
)
print(resp.json())
const res = await fetch(
  "https://api.shoonya.com/NorenWClientAPI/GetQuotes?exch=NSE&token=2885",
  { headers: { Authorization: `Bearer ${Acesstoken}` } }
);
console.log(await res.json());
curl "https://api.shoonya.com/NorenWClientAPI/GetQuotes?exch=NSE&token=2885" \
  -H "Authorization: Bearer $Acesstoken"

Response example

json
{
  "stat": "Ok",
  "tsym": "RELIANCE-EQ",
  "lp": "2934.60",
  "o": "2910.00",
  "h": "2941.80",
  "l": "2905.15",
  "c": "2918.25",
  "bp1": "2934.55",
  "sp1": "2934.65",
  "v": "8423110"
}

Error handling

CodeMeaning
Invalid_InputUnrecognized token/exch pair — re-check against Instrument Master.

Best practices

  • Cache the instrument token lookup locally — don't re-resolve symbol → token on every quote request.
  • For more than a handful of symbols, batch via the WebSocket feed rather than issuing parallel REST calls.

Python example

python
from shoonya_api import ShoonyaClient

client = ShoonyaClient(session_token=Acesstoken)
quote = client.get_quote(exchange="NSE", token="2885")
print(quote.ltp, quote.open, quote.high, quote.low)

Notes

Prices are strings in the raw API response (to preserve exchange-precision formatting) — cast to Decimal rather than float in Python to avoid rounding drift.