Skip to main content

Span Calculator

This calculates the margin requirement for a list of input positions.

Request to be POSTed to uri : /NorenWClientAPI/SpanCalc

Request Details :

Json FieldsPossible valueDescription
jData*Should send json object with fields in below list
Json FieldsPossible valueDescription
actid*Any Account id, preferably actual account id if sending from post login screen.
posArray of json objects. (object fields given in below table)

Position structure as follows:

Json Fields of object in values ArrayPossible valueDescription
prd*M/IProduct name
exch*NFO, CDS, MCX ...Exchange
instname*FUTSTK, FUTIDX, OPTSTK, FUTCUR...Instrument name
symname*USDINR, ACC, ABB,NIFTY..Symbol name
exd*06-DEC-2022DD-MMM-YYYY format
opttCE, PEOption Type
strprc11900.00, 71.0025Strike price
buyqtyBuy Open Quantity
sellqtySell Open Quantity
netqtyNet traded quantity
NOTE: In buyqty ,sellqty and netqty any one of the parameter compulsory.

Example:

curl --location 'https://api.kambala.co.in/NorenWClientAPI/SpanCalc' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer ab2f4117bce53f6b6900c73eebe520468ceea148a3bc4423a973514150f3c415' \
--data 'jData={"actid":"DEMO","pos":[{"prd":"H","exch":"NFO","symname":"ULTRACEMCO","instname":"FUTSTK","exd":"30-MAR-2026","netqty":"50","optt":"XX"}]}'

Response Details :

Response data will be in json format with below fields.

Json FieldsPossible valueDescription
statOk or Not_OkMarket watch success or failure indication.
spanSpan value
expoIExposure margin
span_tradeSpan value ignoring input fields buyqty, sellqty
expo_tradeExposure margin ignoring input fields buyqty, sellqty

Sample Success Response :

{ "request_time": "11:43:54 19-03-2026", "stat": "Ok", "span": "77914.00", "expo": "19180.00", "span_trade": "77914.00", "expo_trade": "19180.00", "pre_trade": "0.00", "add": "0.00", "add_trade": "0.00", "ten": "0.00", "ten_trade": "0.00", "del": "0.00", "del_trade": "0.00", "spl": "0.00", "spl_trade": "0.00" }

Sample Failure Response :

{ "stat":"Not_Ok", "emsg":"Invalid Input : jData is Missing." }