Back to home
Doc Fundamentals
API Reference
Funds Management
Order Management
Portfolio Management
User Authentication
Net-wise Position
POSTJSONRest API
2901
Daily API Calls
100%
Success Rate
62 ms
Avg. Response Time
NetPosition API provides Open Positions in Derivates contracts and Intraday Stock positions.
Overnight Derivative positions can be identified with BodQty flag. While overnigh stock positions will not appear as it will be converted to holding.
REQUEST URL
https://Openapi.5paisa.com/VendorsAPI/Service1.svc/V2/NetPositionNetWise
Request headers
KEY | VALUE |
---|---|
Content-Type | application/json |
Authorization | bearer{Your Access Token} |
Request body
FIELD NAME | MANDATORY | DESCRIPTION | |
---|---|---|---|
head | keySTRING | Yes | AppKey of user or partner. |
body | ClientcodeSTRING | Yes | 5paisa demat account client code of the user in plain text. |
SAMPLE REQUEST BODY :
{
"head": {
"key": "{{vendor_key}}"
},
"body": {
"ClientCode": "{{clientcode}}"
}
}
Response body
FIELD NAME | VALUES | DESCRIPTION | |
---|---|---|---|
head | responseCodeSTRING | 5PNPNWV2 | This is the unique response code for the API. |
statusSTRING | 0: Success2: Invalid head parameters.
| This is the status code which depicts the status of API request to the server. | |
statusDescriptionSTRING | SuccessInvalid head parameters. | This is the description of the status received from the server for the API request. | |
body | NetPositionDetailARRAY | It provides the list of all stocks available in user's IIFL Securities account positions for the day along with holdings as beginning of the day. | |
StatusINTEGER | 0: Success1: No record found9: Invalid Session | This is the numeric code | |
MessageSTRING | SuccessNo record foundInvalid Session | This is the description of the status of API request. |
NetPositionDetail
FIELD NAME | VALUES | DESCRIPTION |
---|---|---|
BODPositionPriceDOUBLE | - | This is the price of the instrument in positions as beginning of the day. |
BodQtyINTEGER | - | This is total quantity of the instrument in positions as beginning of the day. |
BookedPLDOUBLE | - | Total profit or loss booked for the day by the user through the instrument. |
BuyAvgRateDOUBLE | - | This is the average rate at which instrument is bought on the day. |
BuyQtyINTEGER | - | This is total quantity of the instrument bought on the day. |
BuyValueDOUBLE | - | It is total value of the instrument bought on the day. |
ExchSTRING | N: NSE | This is the exchange in which position is available. |
ExchTypeSTRING | C: Cash | This is exchange type in which the position is available. |
LTPDOUBLE | - | This is last traded price for the instrument for the time request is sent. |
MTOMDOUBLE | - | This is the market-to-market profit or loss from the position. |
MultiplierINTEGER | - | This is multiplier of quantity used while calculating profit or loss. |
NetQtyINTEGER | - | This is the net quantity of the position. |
OrderForSTRING | D: Delivery | This is the type of the position. |
PreviousCloseDOUBLE | - | This is closing price of the previous trading day for the instrument. |
ScripCodeINTEGER | - | This is unique code for the instrument. |
ScripNameSTRING | - | This is the name of the instrument in the position. |
SellAvgRateDOUBLE | - | This is average rate for selling the instrument on the day. |
SellQtyINTEGER | - | This is the total quantity of the instrument sold on the day. |
SellValueDOUBLE | - | This is total value of the instrument sold. |
SAMPLE SUCCESS RESPONSE
{
"body": {
"Message": "",
"NetPositionDetail": [
{
"BODPositionPrice": 809.2514,
"BodQty": 5,
"BookedPL": 0,
"BuyAvgRate": 0,
"BuyQty": 0,
"BuyValue": 0,
"Exch": "N",
"ExchType": "C",
"LTP": 818.6,
"MTOM": 46.743,
"Multiplier": 1,
"NetQty": 5,
"OrderFor": "D",
"PreviousClose": 814.6,
"ScripCode": 4963,
"ScripName": "ICICIBANK",
"SellAvgRate": 0,
"SellQty": 0,
"SellValue": 0
},
{
"BODPositionPrice": 91.1505,
"BodQty": 0,
"BookedPL": 0,
"BuyAvgRate": 0,
"BuyQty": 0,
"BuyValue": 0,
"Exch": "N",
"ExchType": "C",
"LTP": 107.6,
"MTOM": 0,
"Multiplier": 1,
"NetQty": 0,
"OrderFor": "D",
"PreviousClose": 100.35,
"ScripCode": 3499,
"ScripName": "TATASTEEL",
"SellAvgRate": 0,
"SellQty": 0,
"SellValue": 0
}
],
"Status": 0
},
"head": {
"responseCode": "IIFLMarRQNPNWV2",
"status": "0",
"statusDescription": "Success"
}
}
SAMPLE FAILURE RESPONSE Failure due to incorrect client code or IIFLMarcookie
{
"body": {
"Message": "Invalid Session",
"NetPositionDetail": [],
"Status": 9
},
"head": {
"responseCode": "IIFLMarRQNPNWV2",
"status": "0",
"statusDescription": "Invalid Session"
}
}
SAMPLE FAILURE RESPONSE Failure when head parameters are wrong
{
"body": null,
"head": {
"responseCode": "IIFLMarRQNPNWV2",
"status": "2",
"statusDescription": "Invalid head parameters."
}
}
On this Page