Fetch every executed fill (trade) for the account today — distinct from Order Book, which lists orders, not fills.
Overview
Trade Book returns one row per fill, not per order. A single order that fills in three exchange-side matches produces three rows here, each carrying its own flid (fill ID), flqty, and flprc — while Order Book would still show that order as one row with an aggregated fillshares/avgprc.
Parameters
Field
Type
Required
Description
uid
string
Required
Logged-in user ID.
actid
string
Required
Account ID of the logged-in user.
Request example
import requests, json
payload = {"uid": "AB1234", "actid": "AB1234"}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
resp = requests.post("https://api.shoonya.com/NorenWClientAPI/TradeBook", data=data)
for t in resp.json():
print(t["tsym"], t["trantype"], t["flqty"], "@", t["flprc"])
Group rows by norenordno when you need per-order fill history; group by flid only when you need individual execution-level detail (e.g. for slippage analysis against each fill's timestamp).
Use this for trade-level P&L reconstruction and audit trails — Positions gives you the current net state, Trade Book gives you how it got there.
Notes
fltm/exch_tm timestamps have shown placeholder epoch values (01-01-1980) in some environments for older fills — don't rely on them for latency measurement without validating against your own environment first.
Overview
Trade Book returns one row per fill, not per order. A single order that fills in three exchange-side matches produces three rows here, each carrying its own
flid(fill ID),flqty, andflprc— while Order Book would still show that order as one row with an aggregatedfillshares/avgprc.Parameters
Request example
Response
Error handling
Best practices
norenordnowhen you need per-order fill history; group byflidonly when you need individual execution-level detail (e.g. for slippage analysis against each fill's timestamp).Notes
fltm/exch_tmtimestamps have shown placeholder epoch values (01-01-1980) in some environments for older fills — don't rely on them for latency measurement without validating against your own environment first.