Web Socket API
Subscribe Position Update
Request
| Json Fields | Possible value | Description |
|---|---|---|
| t | p | ‘p’ represents position subscription |
| uid | User id |
Response
| Json Fields | Possible value | Description |
|---|---|---|
| t | pk | ‘pk’ represents position acknowledgement |
| uid | User id |
On successful connection establishment, position updates will be received if it is made available in the startup (-position_update).
Position Update subscription Updates
| Json Fields | Possible value | Description |
|---|---|---|
| t | pm | ‘pm’ represents position update |
| exch | Exchange segment | |
| tsym | Trading symbol / contract | |
| token | Contract token | |
| uid | User Id | |
| actid | Account Id | |
| prd | Product name to be shown | |
| daybuyqty | Day Buy Quantity | |
| daysellqty | Day Sell Quantity | |
| daybuyamt | Day Buy Amount | |
| daysellamt | Day Sell Amount | |
| cfbuyqty | Carry Forward Buy Quantity | |
| cfsellqty | Carry Forward Sell Quantity | |
| cfbuyamt | Carry Forward Buy Amount | |
| cfsellamt | Carry Forward Sell Amount | |
| openbuyqty | Open Buy Quantity | |
| opensellqty | Open Sell Quantity | |
| openbuyamt | Open Buy Amount | |
| opensellamt | Open Sell Amount | |
| instname | Instrument Name | |
| upload_prc | Upload Price | |
| buyavgprc | Buy Average Price [ (daybuyamt + cfbuyamt) / (daybuyqty + cfbuyqty) ] | |
| sellavgprc | Sell Average Price [ (daysellamt + cfsellamt) / (daysellqty + cfsellqty) ] | |
| rpnl | Realized panel | |
| netqty | Net Quantity [ daybuyqty + cfbuyqty - daysellqty - cfsellqty ] | |
| totbuyamt | Total Buy Amount | |
| totsellamt | Total Sell Amount | |
| totbuyavgprc | Total Buy Avg Price | |
| totsellavgprc | Total Sell Avg Price | |
| child_orders | Array Object, Details given below |
Json Fields of object in child_orders Array
| Json Fields | Possible value | Description |
|---|---|---|
| exch | Exchange segment | |
| token | Contract token | |
| tsym | Trading symbol / contract | |
| daybuyqty | Day Buy Quantity | |
| daysellqty | Day Sell Quantity | |
| daybuyamt | Day Buy Amount | |
| daysellamt | Day Sell Amount | |
| cfbuyqty | CF Buy Quantity | |
| cfsellqty | CF Sell Quantity | |
| cfbuyamt | CF Buy Amount | |
| cfsellamt | CF Sell Amount | |
| openbuyqty | Open Buy Quantity | |
| opensellqty | Open Sell Quantity | |
| openbuyamt | Open Buy Amount | |
| opensellamt | Open Sell Amount | |
| rpnl | Realized panel | |
| netqty | Net Quantity [ daybuyqty + cfbuyqty - daysellqty - cfsellqty ] | |
| upload_prc | Upload Price | |
| totbuyamt | Total Buy Amount | |
| totsellamt | Total Sell Amount | |
| totbuyavgprc | Total Buy Avg Price | |
| totsellavgprc | Total Sell Avg Price | |
| buyavgprc | Buy Average Price | |
| sellavgprc | Sell Average Price |