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

[Bug]: cancel_all_orders method does not work #595

Open
1 task done
albertsalgueda opened this issue Mar 24, 2022 · 2 comments
Open
1 task done

[Bug]: cancel_all_orders method does not work #595

albertsalgueda opened this issue Mar 24, 2022 · 2 comments
Labels
question Further information is requested

Comments

@albertsalgueda
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I call
api.cancel_all_orders()
I check my account from the UI and open orders remain open.

Expected Behavior

All orders should be closed.

Steps To Reproduce

No response

Anything else?

No response

@drew887
Copy link
Contributor

drew887 commented Apr 29, 2022

Hey @albertsalgueda sorry for the delay on this one; does this only happen when using the python SDK? We simply make a DELETE call to the endpoint, so I think this might've been a bug with the API itself.

Is it still happening now ? 🤔

@drew887 drew887 added the question Further information is requested label Apr 29, 2022
@sshcli
Copy link

sshcli commented Jun 22, 2022

@albertsalgueda
I think the problem is that you are trying to cancel the orders on extended hours.
If you go to the web interface, you will see the status pending_cancel
Right?

if that is the case, here is the explanation from Alpaca

The primary reason one sees pending cancel orders is when an order is cancelled during non-market hours. Alpaca forwards the request to the execution partner who has the order, but many of these partners only accept orders and cancelations during market hours or at most limited hours. Orders cancelled after market hours therefore often remain in a pending cancel state until the following market open.

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

No branches or pull requests

3 participants