tedchou12 / webull

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

get_activitives() #299

Open mizzouse opened 2 years ago

mizzouse commented 2 years ago

For paper trading with no activities performed yet (assuming a new webull trading account as well), when calling get_activities(), you get an Inner server error json response from webull. {'msg': 'Inner server error', 'traceId': '17be3070fbdf4af5a8c70964d5452cf6', 'code': 'trade.secAcct.mismatch.with.user', 'data': {}, 'success': False}

mizzouse commented 2 years ago

A suggested fix: result = response.json() if 'success' in result: hasData = response['success'] if result is False: return 'No activities to show'

return result

or something similar to that, and it doesnt want to format right. Sorry about that.

tedchou12 commented 2 years ago

@mizzouse Thanks for the suggestion! But seems like the old endpoint is working well for me...