New Fields Added to "getHolding" Endpoint and Introduction of "getAllHolding" Endpoint


  • Overview:

    Dear SmartAPI Users,

    We are excited to bring you some significant enhancements to our Holding endpoints that will provide you with even more detailed and comprehensive information about your stock holdings and investment performance. These changes are designed to offer you a more accurate representation of your investments and empower you with valuable insights.

    1. Updates to the "getHolding" Endpoint:

    Previously, the "getHolding" endpoint provided the "profitandloss" field, which often displayed as 0.0 for individual stock holdings. We have listened to your feedback and have now updated this endpoint to include the following fields for individual stocks:

    profitandloss: This field now reflects the actual profit and loss for each holding.
    pnlpercentage: This field provides the corresponding profit and loss percentage for the holding.

    Endpoint URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/portfolio/v1/getHolding

    Here's an example of the updated response for the "getHolding" endpoint:

    {
        "tradingsymbol": "TATASTEEL-EQ",
        "exchange": "NSE",
        "isin": "INE081A01020",
        "t1quantity": 0,
        "realisedquantity": 2,
        "quantity": 2,
        "authorisedquantity": 0,
        "product": "DELIVERY",
        "collateralquantity": null,
        "collateraltype": null,
        "haircut": 0.0,
        "averageprice": 111.87,
        "ltp": 130.15,
        "symboltoken": "3499",
        "close": 129.6,
        "profitandloss": 37.0, // Updated
        "pnlpercentage": 16.34 // Updated
    }
    

    2. Introduction of the "getAllHolding" Endpoint:

    We are thrilled to introduce a new API endpoint called "getAllHolding." This endpoint offers a more comprehensive view of your entire investments, including individual stock holdings and a summary of your total investments. In addition to the updates for individual stock holdings, we have introduced a new section in the response called "totalholding," which provides a summary of your entire investments, including:

    totalholdingvalue: The total value of all your holdings.
    totalinvvalue: The total investment value.
    totalprofitandloss: The total profit and loss across all holdings.
    totalpnlpercentage: The total profit and loss percentage for your entire portfolio.

    New Endpoint URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/portfolio/v1/getAllHolding

    Here's an example of the response for the "getAllHolding" endpoint:

    {
        "status": true,
        "message": "SUCCESS",
        "errorcode": "",
        "data": {
            "holdings": [
                {
                    "tradingsymbol": "TATASTEEL-EQ",
                    "exchange": "NSE",
                    "isin": "INE081A01020",
                    "t1quantity": 0,
                    "realisedquantity": 2,
                    "quantity": 2,
                    "authorisedquantity": 0,
                    "product": "DELIVERY",
                    "collateralquantity": null,
                    "collateraltype": null,
                    "haircut": 0.0,
                    "averageprice": 111.87,
                    "ltp": 130.15,
                    "symboltoken": "3499",
                    "close": 129.6,
                    "profitandloss": 37.0,
                    "pnlpercentage": 16.34
                },
                {
                    "tradingsymbol": "PARAGMILK-EQ",
                    "exchange": "NSE",
                    "isin": "INE883N01014",
                    "t1quantity": 0,
                    "realisedquantity": 2,
                    "quantity": 2,
                    "authorisedquantity": 0,
                    "product": "DELIVERY",
                    "collateralquantity": null,
                    "collateraltype": null,
                    "haircut": 0.0,
                    "averageprice": 154.03,
                    "ltp": 201.0,
                    "symboltoken": "17130",
                    "close": 192.1,
                    "profitandloss": 94.0,
                    "pnlpercentage": 30.49
                },
                {
                    "tradingsymbol": "SBIN-EQ",
                    "exchange": "NSE",
                    "isin": "INE062A01020",
                    "t1quantity": 0,
                    "realisedquantity": 8,
                    "quantity": 8,
                    "authorisedquantity": 0,
                    "product": "DELIVERY",
                    "collateralquantity": null,
                    "collateraltype": null,
                    "haircut": 0.0,
                    "averageprice": 573.1,
                    "ltp": 579.05,
                    "symboltoken": "3045",
                    "close": 570.5,
                    "profitandloss": 48.0,
                    "pnlpercentage": 1.04
                }
            ],
            "totalholding": {
                "totalholdingvalue": 5294,
                "totalinvvalue": 5116,
                "totalprofitandloss": 178.14,
                "totalpnlpercentage": 3.48
            }
        }
    }
    

    3. SDK Support:

    We want to inform you that the "getHolding" endpoint is already supported in the current SDKs. You can start using the updated response format immediately without any changes.

    As for the "getAllHolding" endpoint, we understand its importance, and we are actively working on updating the SDKs to support this new feature. In the coming days, you can expect an SDK update that will enable you to seamlessly integrate "getAllHolding" into your applications.

    These improvements will provide you with a more accurate and insightful overview of your investments. We hope you find these updates valuable and encourage you to make the most of these enhanced features in your applications.

    Thank you for being a part of the SmartAPI community. If you have any questions or feedback, please don't hesitate to reach out to our support team.

    Happy trading!



  • @admin happy trading


  • @admin
    i want
    Api
    start


  • @admin plz provide OHLCV data in market feed data in tick level