Common conventions shared across every Shoonya API endpoint — base URL, request format, authentication, and response shape.
Overview
Every REST endpoint in this documentation follows the same structural conventions. Understanding them once here means you won't need them repeated on every individual API page — only the endpoint-specific jData fields differ.
Base URL
REST base
https://api.shoonya.com/NorenWClientAPI/
WebSocket base
wss://api.shoonya.com/NorenWSAPI/
EOD/historical data base
https://api.shoonya.com/chartapi/getdata/
All endpoint paths in this documentation are given relative to the REST base — e.g. Logout resolves to https://api.shoonya.com/NorenWClientAPI/Logout.
Authentication
Every authenticated call carries the access token as a Bearer token in the Authorization header, obtained via the OAuth login flow:
text
Authorization: Bearer<AccessToken>
Unlike some other Noren-based gateways, the token is not repeated inside the request body — only in the header.
Request format
All requests use Content-Type: text/plain with a single URL-encoded-style field, jData, carrying the JSON-encoded payload as the request body:
Numeric values (quantity, price) are typically sent as strings within the JSON payload, not native JSON numbers — follow the exact type shown in each endpoint's Request example.
Overview
Every REST endpoint in this documentation follows the same structural conventions. Understanding them once here means you won't need them repeated on every individual API page — only the endpoint-specific
jDatafields differ.Base URL
https://api.shoonya.com/NorenWClientAPI/wss://api.shoonya.com/NorenWSAPI/https://api.shoonya.com/chartapi/getdata/All endpoint paths in this documentation are given relative to the REST base — e.g.
Logoutresolves tohttps://api.shoonya.com/NorenWClientAPI/Logout.Authentication
Every authenticated call carries the access token as a
Bearertoken in theAuthorizationheader, obtained via the OAuth login flow:Unlike some other Noren-based gateways, the token is not repeated inside the request body — only in the header.
Request format
All requests use
Content-Type: text/plainwith a single URL-encoded-style field,jData, carrying the JSON-encoded payload as the request body:Example — placing an order:
Response format
Every response is a JSON object carrying at minimum a
statfield:statOk/Not_OkemsgstatisNot_Ok— human-readable error detail. See Error Handling.Successful responses add endpoint-specific fields alongside
stat— these are documented individually on each API's Response section.Field naming conventions
tsym,qty,prc,trgprc) — see the Glossary for the full list.exch,buy_or_sell,price_type,product_type) take fixed short codes, not free text — see Exchange Segment Codes, Transaction Type Codes, and Order Type Codes.Related
See Authentication Overview for the full OAuth login sequence, Error Handling for the complete error response taxonomy, and Rate Limits for request quotas.