tedchou12 / webull

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

Trailing Stop Loss Order Not Working? #295

Closed Alanavai closed 2 years ago

Alanavai commented 2 years ago

Hi,

Just a simple question. I'm trying to put in a trailing stop loss sell order but when I look at my Webull nothing happens.

Here's what I wrote:

wb.place_order(stock="STRR", action="SELL", orderType="STP TRAIL", quant=3, trial_value=5)

Edit: I just realized if I log the return result it says this: {'success': False, 'code': 'trade.webull.SYSTEM_INTERNAL_ERROR', 'msg': 'Inner server error GTX_NOT_SUPPORT_MARKET', 'data': {'lastSerialId': '61cd26acdc16720001******'}}

I originally thought its because you're not allowed to place orders outside of trading hours, but the regular limit sell works fine.

cnoffsin commented 2 years ago

@Alanavai can you give a sample code snippet of how you got that logging return of the result?

Alanavai commented 2 years ago

Actually, the reason is because brokers don't allow you to place any kind of stop loss order in extended hours.