tedchou12 / webull

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

Issue with place oto order #216

Closed jbonde32 closed 3 years ago

jbonde32 commented 3 years ago

When using the place_order_otoco function, getting error:

if result1['forward'] : KeyError: 'forward'

Maybe the forward name changed?

Jakezheng commented 3 years ago

same problem

Jakezheng commented 3 years ago

{'msg': 'Inner server error', 'traceId': '**', 'code': 'trade.secAcct.mismatch.with.user', 'data': {}, 'success': False} When check_otoco_orders

tedchou12 commented 3 years ago

this should be fixed. Let me know if you still have troubles

jbonde32 commented 3 years ago

Hey just tried this again and still getting the error. The line of code i'm running is:

wb.place_order_otoco(stock = stock, price = price, stop_loss_price = stop_loss, limit_profit_price = take_prof, time_in_force = 'gtc', quant = shares)

Still receiving this error: image

tedchou12 commented 3 years ago

@jbonde32 How did you install the new package? I didn't upload to pypi yet, so you would have to download it from github and install directly.

zbouvier commented 3 years ago

The fix does work. You will get a similar error if you don't fill out quantity. Could maybe add some internal error handling to represent that, but not really needed. I may put in a PR for it later if people actually want it >.>