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

close_all_positions should take optional cancel_orders argument #573

Open
1 task done
asxzy opened this issue Feb 14, 2022 · 0 comments
Open
1 task done

close_all_positions should take optional cancel_orders argument #573

asxzy opened this issue Feb 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@asxzy
Copy link

asxzy commented Feb 14, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

As a user, I'd like the close_all_positions to take an optional boolean cancel_orders argument as defined in the endpoint.

Describe the solution you'd like.

    def close_all_positions(self, cancel_orders=False) -> Positions:
        """Liquidates all open positions at market price"""
        resp = self.delete('/positions', {"cancel_orders":True} if cancel_orders else None)

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

@drew887 drew887 added the enhancement New feature or request label Apr 18, 2022
brucewen05 added a commit to brucewen05/alpaca-trade-api-python that referenced this issue Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants