tedchou12 / webull

Unofficial APIs for Webull.
MIT License
597 stars 181 forks source link

Not able to make MKT trades #368

Closed smr0056 closed 1 year ago

smr0056 commented 1 year ago

Hello,

I am unable to make MKT trades using the API. I get the below exception. {'success': False, 'code': 'trade.system.exception', 'msg': 'The system is busy', 'data': {'lastSerialId': '***'}}

I am able to make KMT trades though. I tried with different sticks and different amounts. I did some digging on the browser network tracing since I could make MKT trades through the browser. In the browser, the API endpoint looks a little different than what's present in this github repo.

image image image

Is anyone else facing this issue and can the different endpoint be the reason for my issue? Any help would be appreciated. TIA

smr0056 commented 1 year ago

I was able to solve this once I compared my python API call to the webull browser app API call. I cannot believe I wasted so much time and the issue was just a case-sensitive keyword.

Expected: enforce='DAY' What I was doing: enforce='Day'

tedchou12 commented 1 year ago

Thank you for the coffee! I am glad you are able to solve it!