Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fivepaisa Holding Issue #118

Open
crypt0inf0 opened this issue Dec 14, 2024 · 1 comment
Open

Fivepaisa Holding Issue #118

crypt0inf0 opened this issue Dec 14, 2024 · 1 comment

Comments

@crypt0inf0
Copy link
Contributor

I get the following error while visiting holding section,

INFO:werkzeug:127.0.0.1 - - [14/Dec/2024 05:12:44] "GET /socket.io/?EIO=4&transport=websocket&sid=F-CvdKIRMC3P7Hc8AAAI HTTP/1.1" 200 -
ERROR:app:Exception on /holdings [GET]
Traceback (most recent call last):
  File "/usr/local/python/3.12.1/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/site-packages/flask_restx/api.py", line 672, in error_router
    return original_handler(e)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/site-packages/flask_cors/extension.py", line 194, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
                                                ^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/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 "/workspaces/openalgo/utils/session.py", line 77, in decorated_function
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/workspaces/openalgo/blueprints/orders.py", line 192, in holdings
    holdings_data = transform_holdings_data(holdings_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/openalgo/broker/fivepaisa/mapping/order_data.py", line 420, in transform_holdings_data
    pnlpercent = (ltpvalue - buyvalue)/buyvalue * 100
                 ~~~~~~~~~~~~~~~~~~~~~^^~~~~~~~
ZeroDivisionError: float division by zero
INFO:werkzeug:127.0.0.1 - - [14/Dec/2024 05:12:44] "GET /holdings HTTP/1.1" 500 -
@marketcalls
Copy link
Owner

Do you have any active holdings right now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants