marketcalls / openalgo

Open Source Algo Trading Platform for Everyone
https://docs.openalgo.in
GNU Affero General Public License v3.0
137 stars 63 forks source link

Dhan Holding page Error #61

Closed tradewithmadhan closed 1 month ago

tradewithmadhan commented 2 months ago

Dhan Holding page Internal error ... Attaching below log

127.0.0.1 - - [19/Aug/2024 22:36:36] "GET /socket.io/?EIO=4&transport=websocket&sid=a9rAfX0kzj4GLklvAAAK HTTP/1.1" 200 - [{'exchange': 'ALL', 'tradingSymbol': 'GREENPOWER', 'securityId': '20110', 'isin': 'INE999K01014', 'totalQty': 1000, 'dpQty': 1000, 't1Qty': 0, 'avail ableQty': 1000, 'collateralQty': 0, 'avgCostPrice': 23.72}] [2024-08-19 22:36:36,672] ERROR in app: Exception on /holdings [GET] Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1473, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Documents\openalgo\blueprints\orders.py", line 185, in holdings holdings_data = map_portfolio_data(holdings_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Documents\openalgo\broker\dhan\mapping\order_data.py", line 206, in map_portfolio_data portfolio_data.get('errorCode') == "DHOLDING_ERROR" or ^^^^^^^^^^^^^^^^^^ AttributeError: 'list' object has no attribute 'get' 127.0.0.1 - - [19/Aug/2024 22:36:36] "GET /holdings HTTP/1.1" 500 -

image

marketcalls commented 1 month ago

update to the latest 1.0.0.6 where the dhan holding issue got fixed