tedchou12 / webull

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

Historical order endpoint #258

Closed uhyeet closed 3 years ago

uhyeet commented 3 years ago

Hello, I was having some issues with the historical order endpoint not working properly for new accounts (2 week old accounts), but fine for older accounts of mine. I did some digging and found issue 218 was closed with the same problem. The issue was tagged closed, but the endpoint in the current endpoints.py file actually left out /trade which is causing it to not work.

In endpoints.py

Current endpoint: self.base_ustradebroker_url = 'https://ustrade.webullbroker.com/api'

Correct endpoint: self.base_ustradebroker_url = 'https://ustrade.webullbroker.com/api/trade'

I've tested it and it works for both old and new accounts just as was stated in issue 218, it just needs /trade on the back end there. Also the current pypi version 0.3.4 does not reflect these new endpoint changes for the new base_ustradebroker_url at all. Anyone with new accounts looking to get it working needs to copy over the current endpoints.py file (with the correct/updated URL) until a new pypi version gets pushed with these changes for both old and new account compatibility.

Hope this helps someone and thank you guys for everything you've done on this project. Love it.

tedchou12 commented 3 years ago

Thank you! @uhyeet @alexonab

Sorry for my procrastinations...