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

cancel_order for Options #398

Open
pankajai opened this issue May 19, 2023 · 7 comments
Open

cancel_order for Options #398

pankajai opened this issue May 19, 2023 · 7 comments

Comments

@pankajai
Copy link

pankajai commented May 19, 2023

cancel_order is not working for cancelling an option order. Am I missing something here.
I retrieved the Working order and then tried using both in canel order - 'orderId': 713120601031575552, 'comboId': '82JSC93IK3RQ16PC6MMCUEM929' - none helped.

I verified in Webull App - the order is still active.

--- CODE snippet ---
for order in open_orders:
print(order['orders'][0]['orderId'],"-",order['orders'][0]['statusCode'])
print(wb.cancel_order('713120601031575552'))
print(wb.cancel_order('82JSC93IK3RQ16PC6MMCUEM929'))

--- OUTPUT ---
713120601031575552 - Working
False
False

@DouGrimaldi
Copy link

bumping this, cancel order isn't working for me either and i've tried a lot to fix it. Same as you, it says it works but it doesn't.

@Adidez
Copy link

Adidez commented May 22, 2023

Where are you pulling 713120601031575552 and 82JSC93IK3RQ16PC6MMCUEM929 from exactly?

Also can I see your code for placing an option order as well

@pankajai
Copy link
Author

pankajai commented May 22, 2023

-- Code to place the order, many of these are either derived or user input
option_order = wb.place_order_option(optionId=vOpt_Id, lmtPrice=vOpt_LmtPr, action='BUY', orderType='LMT', enforce='GTC', quant=2)

-- I get those OrderId and ComboId from the Working orders output -
open_orders = wb.get_history_orders('Working')

@Adidez
Copy link

Adidez commented May 22, 2023

I mean when you place the order. How are you pulling the optionId exactly? This is important in the final cancellation.

@Adidez
Copy link

Adidez commented May 22, 2023

If you have github I can just look at the entire class would be easier

@DouGrimaldi
Copy link

I mean when you place the order. How are you pulling the optionId exactly? This is important in the final cancellation.

can't speak for the other guy, but would it be possible for you to share an example of how to properly cancel the option order? Because on my end it says the order should be cancelled but when I check it isn't.

@Adidez
Copy link

Adidez commented May 23, 2023 via email

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

3 participants