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

KEYVALUE

Content-Type

application/json

Authorization

bearer {Your Access Token}

Request body

FIELD NAMEMANDATORYDESCRIPTION

head

key

STRING

Yes

AppKey Of User or Partner

body

ClientCode

STRING

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 NAMEVALUESDESCRIPTION

head

responseCode

STRING

5PHoldingV3

This is the unique response code for the API.

status

STRING

0: Success

2: Invalid head parameters.

 

This is the status code which depicts the status of API request to the server.

statusDescription

STRING

Success

Invalid head parameters.

This is the description of the status received from the server for the API request.

body

Data

ARRAY

 

 

 

It provides the list of all stocks available in user's 5paisa account holdings.

CacheTime

INTEGER

 

 

 

It is the cache time for the update in holdings data.

Status

INTEGER

0: Success

1: No data found for this Client.

9: Invalid Session

This is the numeric code
for the status of API 
request

 

Message

STRING

Success

No data found for this Client.

Invalid Session

This is the description of the status of API request.

Data

FIELD NAMEVALUESDESCRIPTION

AvgRate

DOUBLE

-

Avg Price for which the stock holding is brought.

BseCode

INTEGER

-

This is the unique scrip code of the instrument for BSE.

CurrentPrice

DOUBLE

-

It is the market price of the instrument.

DPQty

INTEGER

-It is the market price of the instrument.

Exch

STRING

N: NSE
B: BSE
M: MCX

This is the exchange in which holdings is available.

ExchType

STRING

C: Cash
D: Derivatives (NSE, BSE & MCX F&O)
U: Currency

This is exchange type in which the holdings is available.

FullName

STRING

-

This is the full name for the instrument in the holdings.

NseCode

INTEGER

-This is the unique scrip code of the instrument for NSE.

POASigned

STRING

Y: E-Dis authorized

N: Unauthorized quantity

This is the flag for E-Dis authorization of the holdings.

PoolQty

STRING

-

DP Pool Quantity of the instrument.

Quantity

INTEGER

-

Total Holding Quantity of the Instrument.

ScripMultiplier

INTEGER

-

ScripMultiplier of the instrument.

Symbol

STRING

-

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

Knowledge base

Net Position API docs is the next thing to checkout
Net Position API
how to use this API that suits your work flow best
Start using our APIs

Contribute and get rewarded

Help make these Dev Docs great, contribute to the APIs and get rewarded for your contribution

Need Help

Ask Developer Community

Contact Support

 

Changelog

Changes made to our APIs - Changelog

AVENUES