Skip to Main Content
POST/NorenWClientAPI/SingleOrdHist

Order History

Fetch the full lifecycle history of a single order by its Noren order number.

Overview

Order History returns every state transition a single order has gone through — from PendingNew through fills, modifications, or rejection — as an ordered array. Use it when Order Book's current-state snapshot isn't enough and you need to know how an order got to its current state (e.g. debugging why a modify was rejected, or confirming the exact sequence of partial fills).

Parameters

FieldTypeRequiredDescription
uidstringRequiredLogged-in user ID.
norenordnostringRequiredNoren order number to fetch history for, as returned by Place Order or Order Book.

Request example

import requests, json
 
payload = {"uid": "AB1234", "norenordno": orderNumber}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
 
resp = requests.post("https://api.shoonya.com/NorenWClientAPI/SingleOrdHist", data=data)
for event in resp.json():
    print(event["status"], event.get("reporttype"), event.get("norentm"))
const payload = { uid: "AB1234", norenordno: orderNumber };
const data = `jData=${JSON.stringify(payload)}&jKey=${accessToken}`;
 
const res = await fetch("https://api.shoonya.com/NorenWClientAPI/SingleOrdHist", {
  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/SingleOrdHist \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'jData={"uid":"AB1234","norenordno":"24121500001234"}' \
  --data-urlencode "jKey=$ACCESS_TOKEN"

Response

json
[
  { "stat": "Ok", "norenordno": "24121500001234", "status": "OPEN", "reporttype": "NewAck", "norentm": "09:15:03 15-12-2024" },
  { "stat": "Ok", "norenordno": "24121500001234", "status": "COMPLETE", "reporttype": "Fill", "fillshares": "100", "avgprc": "1272.30", "norentm": "09:15:41 15-12-2024" }
]

Fields mirror Order Book, with reporttype identifying the specific lifecycle event — see Report Type values (NewAck, Fill, Rejected, Replaced, Canceled, and their pending/rejected variants).

Error handling

json
{
  "stat": "Not_Ok",
  "emsg": "Rejected : ORA:Order not found"
}

Best practices

  • Reach for this endpoint only when debugging a specific order — for bulk state, Order Book is far cheaper against your rate limit.
  • Cross-reference reporttype against the Order Update Feed's reporttype values — they use the same enum, so logic written for one transfers to the other.

Notes

This is a REST pull of the same event stream the Order Update Feed pushes over WebSocket in real time — prefer the feed for anything live, and this endpoint for after-the-fact debugging.