Skip to Main Content
POST/NorenWClientAPI/TPSeries

Time/Price Series

Fetch intraday OHLCV candle data at a configurable interval, for charting and short-lookback backtesting.

Parameters

FieldTypeRequiredDescription
uidstringrequiredYour logged-in client/user ID.
exchstringrequiredExchange segment code, e.g. NSE.
tokenstringrequiredInstrument token from Instrument Master.
ststring (epoch seconds)requiredStart time.
etstring (epoch seconds)requiredEnd time.
intrvstringoptionalCandle interval in minutes: one of 1, 3, 5, 10, 15, 30, 60, 120, 240. Defaults to 1.

Request example

import requests

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

resp = requests.post(
    "https://api.shoonya.com/NorenWClientAPI/TPSeries",
    json=params, headers=headers,
)
print(resp.json())
const res = await fetch("https://api.shoonya.com/NorenWClientAPI/TPSeries", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${Acesstoken}` },
  body: JSON.stringify({ exch: "NSE", token: "2885", intrv: 5 }),
});
console.log(await res.json());
curl -X POST https://api.shoonya.com/NorenWClientAPI/TPSeries \
  -H "Authorization: Bearer $Acesstoken" \
  -H "Content-Type: application/json" \
  -d '{"uid":"ABC123","exch":"NSE","token":"2885","intrv":5}'

Response example

json
[
  {
    "time": "07-12-2022 09:15:00",
    "into": "255.00",
    "inth": "255.65",
    "intl": "254.65",
    "intc": "255.65",
    "intv": "146",
    "v": "146",
    "oi": "0"
  },
  {
    "time": "07-12-2022 09:20:00",
    "into": "255.65",
    "inth": "256.40",
    "intl": "255.10",
    "intc": "256.05",
    "intv": "212",
    "v": "358",
    "oi": "0"
  }
]
Unverified against a live captureField names above follow the standard Noren candle schema (into/inth/intl/intc = open/high/low/close, v = cumulative volume) but haven't been diffed against a fresh debug log for this specific endpoint. Confirm before publishing.

Error handling

CodeMeaning
Invalid_InputUnrecognized token/exch pair, or st is later than et.
(non-list response)The SDK treats any non-list JSON body as an error and returns None — check stat/emsg on the raw response if you're not using the SDK.

Best practices

  • Request the widest interval that still satisfies your strategy — a 1-minute pull over a full session is a lot heavier than a 5-minute one for the same lookback.
  • Cache the response locally within the trading day; re-requesting the same stet window repeatedly wastes your rate limit.

Python example

python
from api_helper import NorenApiPy

api = NorenApiPy()
api.injectOAuthHeader(cred["Access_token"], cred["UID"], cred["Account_ID"])

# 5-minute candles for the current session, from session start
ret = api.get_time_price_series(exchange="NSE", token="2885")
print(len(ret))
print(ret[0])   # earliest candle
print(ret[-1])  # latest candle

Notes

Candles are returned in a flat list, not wrapped in a values key like some other market-data endpoints — index into it directly. If the SDK call returns None, the response body wasn't a JSON list (i.e. an error payload), not an empty result set.