Positions Book
Request to be POSTed to uri : /NorenWClientTP/PositionBook
Warning: This endpoint should be strictly used as a single call for fetching m2m without a while loop. For live m2m tracking please use the web socket feed for fetching real time prices and computing the m2m.
Request Details
| Parameter Name | Possible value | Description |
|---|---|---|
| jData* | Should send json object with fields in below list | |
| jKey* | Key Obtained on login success. |
| Json Fields | Possible value | Description |
|---|---|---|
| uid* | Logged in User Id | |
| actid* | Account Id of logged in user |
Example
curl https://api.infinn.in/NorenWClientTP/PositionBook \ -d "jData={\"uid\":\"VIDYA\", \"actid\":\"ACCT_1\"}" \ -d "jKey=GHUDWU53H32MTHPA536Q32WR"Response Details
Response data will be in json Array of objects with below fields in case of success:
| Json Fields | Possible value | Description |
|---|---|---|
| stat | Ok or Not_Ok | Position book success or failure indication. |
| exch | Exchange segment | |
| tsym | Trading symbol / contract. | |
| token | Contract token | |
| uid | User Id | |
| actid | Account Id | |
| prd | Product name to be shown. | |
| netqty | Net Position quantity | |
| netavgprc | Net position average price | |
| daybuyqty | Day Buy Quantity | |
| daysellqty | Day Sell Quantity | |
| daybuyavgprc | Day Buy average price | |
| daysellavgprc | Day Sell average price | |
| daybuyamt | Day Buy Amount | |
| daysellamt | Day Sell Amount | |
| cfbuyqty | Carry Forward Buy Quantity | |
| cforgavgprc | Original Avg Price | |
| cfsellqty | Carry Forward Sell Quantity | |
| cfbuyavgprc | Carry Forward Buy average price | |
| cfsellavgprc | Carry Forward Buy average price | |
| cfbuyamt | Carry Forward Buy Amount | |
| cfsellamt | Carry Forward Sell Amount | |
| lp | LTP | |
| rpnl | RealizedPNL | |
| urmtom | UnrealizedMTOM. Can be recalculated in LTP update = netqty * (lp from web socket - netavgprc) * prcftr |
|
| bep | Break even price | |
| openbuyqty | ||
| opensellqty | ||
| openbuyamt | ||
| opensellamt | ||
| openbuyavgprc | ||
| opensellavgprc | ||
| mult | ||
| pp | ||
| prcftr | gn*pn/(gd*pd) | |
| ti | Tick size | |
| ls | Lot size | |
| request_time | This will be present only in a failure response. |
Response data will be in json format with below fields in case of failure:
| Json Fields | Possible value | Description |
|---|---|---|
| stat | Not_Ok | Position book failure indication. |
| request_time | Response received time. | |
| emsg | Error message |
Sample Success Response
[ { "stat":"Ok", "uid":"POORNA", "actid":"POORNA", "exch":"NSE", "tsym":"ACC-EQ", "prarr":"C", "pp":"2", "ls":"1", "ti":"5.00", "mult":"1", "prcftr":"1.000000", "daybuyqty":"2", "daysellqty":"2", "daybuyamt":"2610.00", "daybuyavgprc":"1305.00", "daysellamt":"2610.00", "daysellavgprc":"1305.00", "cfbuyqty":"0", "cfsellqty":"0", "cfbuyamt":"0.00", "cfbuyavgprc":"0.00", "cfsellamt":"0.00", "cfsellavgprc":"0.00", "openbuyqty":"0", "opensellqty":"23", "openbuyamt":"0.00", "openbuyavgprc":"0.00", "opensellamt":"30015.00", "opensellavgprc":"1305.00", "netqty":"0", "netavgprc":"0.00", "lp":"0.00", "urmtom":"0.00", "rpnl":"0.00", "cforgavgprc":"0.00" }]Sample Failure Response
{ "stat":"Not_Ok", "request_time":"14:14:11 26-05-2020", "emsg":"Error Occurred : 5 \"no data\""}