Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Wrong data in obj.holding() function

    Python SDK
    0
    7
    70
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GaryR01 last edited by

      Holding data is incorrect. I have sold NAUKRI stock still it's appearing in obj.holding() function.

      Below is the screenshot of my portfolio:

      61fa0c43-bba2-4f16-8afa-b104ca4fcb9a-image.png

      Below is the output I am getting after calling obj.holding() function:

      [{'tradingsymbol': 'NAUKRI-EQ', 'exchange': 'NSE', 'isin': 'INE663F01024', 't1quantity': 1, 'realisedquantity': 0, 'quantity': 1, 'authorisedquantity': 0, 'profitandloss': 0.0, 'product': 'DELIVERY', 'collateralquantity': None, 'collateraltype': None, 'haircut': 0.0, 'averageprice': 3936.9156, 'ltp': 3920.2, 'symboltoken': '13751', 'close': 3920.2}]
      NAUKRI-EQ 13751 1 3920.2 3936.9156 <class 'float'>

      V R 2 Replies Last reply Reply Quote 0
      • V
        Vignesha @GaryR01 last edited by Vignesha

        @GaryR01 Just ran the code

        print(obj.holding())

        and the output I'm getting the output which isn't making that much sense

        {'status': True,
        'message': 'SUCCESS',
        'errorcode': '',
        'data': [{'tradingsymbol': None,
        'exchange': 'NSE',
        'isin': 'INE785M01013',
        't1quantity': x,
        'realisedquantity': 0,
        'quantity': x,
        'authorisedquantity': 0,
        'profitandloss': 0.0,
        'product': 'DELIVERY',
        'collateralquantity': None,
        'collateraltype': None,
        'haircut': 0.0,
        'averageprice': 93.3032,
        'ltp': 74.05,
        'symboltoken': '29124',
        'close': 74.05}]}

        I marked the quantity as x but it was right
        and average price is right

        but

        1. the "Exchange", "LTP" and "Close" are not right
        2. Symboltoken is 29124 from masterjson website link it belongs to HEROMOTOCO24NOV222000PE it looks like f&o or something but I dont even trade there
        3. The stock I invested is a BSE stock and the token I see in master json is 534809

        @admin can you please let know if its a backend issue (I'm 99% sure we are not wrong)
        Also in general BSE Stocks are not working that well with the API

        @GaryR01 not sure how you're getting the trading symbols and other things.. Did you run anything other than the obj.holding()?

        A 1 Reply Last reply Reply Quote 0
        • A
          admin @Vignesha last edited by

          Hi @GaryR01 @Vignesha

          There is an error in the getHoldings API. It is sending incorrect response. We are working on this, unfortunately due to dependencies we cannot guarantee the resolution timeline.

          V 1 Reply Last reply Reply Quote 0
          • V
            Vignesha @admin last edited by

            @admin Thanks for acknowledging this. Hope you can fix it soon.

            Also for the other query BSE date not available on historical data?

            I can get the BSE stock's live date so it's not affecting me too much but from the historical data, I can only fetch NSE data and not BSE stock data.

            A 1 Reply Last reply Reply Quote 0
            • A
              admin @Vignesha last edited by

              @Vignesha said in Wrong data in obj.holding() function:

              Also for the other query BSE date not available on historical data?

              HI @Vignesha We are currently providing only NSE segment and NFO segment (Only Futures) historical data . We have noted your feedback for BSE segment historical data.

              1 Reply Last reply Reply Quote 0
              • R
                rganapthy6 @GaryR01 last edited by

                @admin this is still happening

                A 1 Reply Last reply Reply Quote 0
                • A
                  admin @rganapthy6 last edited by

                  Hi @rganapthy6 @Vignesha @GaryR01

                  We have deployed a fix on 19th November 2022, this will help you to fetch holdings correctly. We want to thank you again for the feedback and bug reports you've submitted. Through them, we are able to improve your API trading experience. We are happy to share with you this new release resolves all of the pending issues pertaining to getHolding API.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post