Back to home
Doc Fundamentals
API Reference
Funds Management
Order Management
Portfolio Management
User Authentication
Holdings
POSTJSONRest API
357
Daily API Calls
100%
Success Rate
41.1 ms
Avg. Response Time
The API is helpful in building holdings section in any application as well as providing various analytics options through holdings data of the user. This API requires successful authentication of the user for which data is being fetched.
A successful API response provides instrument details, quantity in holdings, current value of holdings, current profit and loss through the holdings as well as flag for E-Dis authorization of the holdings through the depository.
REQUEST URL
https://Openapi.5paisa.com/VendorsAPI/Service1.svc/V3/Holding
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. |
SAMPLE REQUEST BODY :
{
"head": {
"key": "{Your App Key}"
},
"body": {
"ClientCode": "{Your Client Code}"
}
}
Response body
FIELD NAME | VALUES | DESCRIPTION | |
---|---|---|---|
head | responseCodeSTRING | 5PHoldingV3 | 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 | DataARRAY | It provides the list of all stocks available in user's 5paisa account holdings. | |
CacheTimeINTEGER | It is the cache time for the update in holdings data. | ||
StatusINTEGER | 0: Success1: No data found for this Client.9: Invalid Session | This is the numeric code | |
MessageSTRING | SuccessNo data found for this Client.Invalid Session | This is the description of the status of API request. |
Data
FIELD NAME | VALUES | DESCRIPTION |
---|---|---|
AvgRateDOUBLE | - | Avg Price for which the stock holding is brought. |
BseCodeINTEGER | - | This is the unique scrip code of the instrument for BSE. |
CurrentPriceDOUBLE | - | It is the market price of the instrument. |
DPQtyINTEGER | - | It is the market price of the instrument. |
ExchSTRING | N: NSE | This is the exchange in which holdings is available. |
ExchTypeSTRING | C: Cash | This is exchange type in which the holdings is available. |
FullNameSTRING | - | This is the full name for the instrument in the holdings. |
NseCodeINTEGER | - | This is the unique scrip code of the instrument for NSE. |
POASignedSTRING | Y: E-Dis authorizedN: Unauthorized quantity | This is the flag for E-Dis authorization of the holdings. |
PoolQtySTRING | - | DP Pool Quantity of the instrument. |
QuantityINTEGER | - | Total Holding Quantity of the Instrument. |
ScripMultiplierINTEGER | - | ScripMultiplier of the instrument. |
SymbolSTRING | - | This is symbol name for the instrument in holdings |
SAMPLE SUCCESS RESPONSE
{
"body": {
"CacheTime": 300,
"Data": [
{
"AvgRate": 455.7229,
"BseCode": 500875,
"CurrentPrice": 440.1,
"DPQty": 7,
"Exch": "N",
"ExchType": "C",
"FullName": "ITC LTD",
"NseCode": 1660,
"POASigned": "N",
"PoolQty": 0,
"Quantity": 7,
"ScripMultiplier": 1,
"Symbol": "ITC"
},
{
"AvgRate": 242.45,
"BseCode": 543940,
"CurrentPrice": 253.8,
"DPQty": 40,
"Exch": "N",
"ExchType": "C",
"FullName": "JIO FIN SERVICES LTD",
"NseCode": 18143,
"POASigned": "N",
"PoolQty": 0,
"Quantity": 40,
"ScripMultiplier": 1,
"Symbol": "JIOFIN"
}
],
"Message": "Success",
"Status": 0
},
"head": {
"responseCode": "5PHoldingV3",
"status": "0",
"statusDescription": "Success"
}
}
SAMPLE FAILURE RESPONSE Failure due to incorrect client code
{
"body": {
"CacheTime": 0,
"Data": [],
"Message": "Invalid ClientCode",
"Status": 2
},
"head": {
"responseCode": "5PHoldingV3",
"status": "0",
"statusDescription": "Success"
}
}
SAMPLE FAILURE RESPONSE Failure when head parameters are wrong
{
"body": null,
"head": {
"responseCode": "5PHoldingV3",
"status": "2",
"statusDescription": "Invalid head parameters."
}
}
On this Page