tedchou12 / webull

Unofficial APIs for Webull.
MIT License
601 stars 185 forks source link

Place order returns temp id #396

Open talshum opened 1 year ago

talshum commented 1 year ago

hey all of the sudden i get for place order: {'success': True, 'data': {'orderId': 'F2H4H1J8CH1E71S2F3BUFSQL79'}}

the orderID is wrong/temp and changes once the order is submitted. Any idea how to map this one to the original ID?

Thanks!

Biletnikoff commented 1 year ago

What type of order is the original one?

BobLiu20 commented 1 year ago

Me too... Does anyone has solution?

AdoNunes commented 1 year ago

same here for place_order_option, the orderId doesn't match the orderID from get_current_orders() the orderId generated when placing the order doesn't work for canceling the order, instead I have to get the current orders and infer the correct order to cancel it. However, in the get_history_orders() the orderID from placed_order shows up How can I map the orderID from place_order_option?

ICANTFINDAUSERNAMEATALL commented 1 year ago

If I remember correctly, if you modify the order, the modifyorder function will return the updated order id since webull web cancels the old order and then places another order on top(I believe). Let me know if this doesn't work.

ICANTFINDAUSERNAMEATALL commented 1 year ago

If you know the specific ticker, you can just search inside of all the open orders and find the order id with the same ticker or option id.

AdoNunes commented 1 year ago

I think this has been resolved, maybe webull made a temporary change. I get the correct order_id and I can cancel it