Skip to content
PageMastr edited this page Mar 4, 2021 · 10 revisions

Webull

APIs for webull, you are free to use, but code not extensively checked and Webull may update the APIs or the endpoints at any time. https://www.webull.com/

How do you find the APIs? Are they official?

Since the APIs are not officially supported by Webull, so they are not public. However, if you are interested to explore for new APIs or if they APIs in the code doesn't have what you want, you can always look for those yourself. The simplest way to look for them is to open the "Inspector" in your browser (Chrome, IE or any other) and search for the POST, GET requests that outputs the desirable information. However, since some information may be processed by the javascript on your client side, is not always easy to look for what you want.

The endpoints do become updated from time to time, so some endpoints do break if Webull decides to change something on their server. I used most of the endpoints myself, so if major changes do come through, I will make sure they work adequately.

How can I support the project?

For Those who truly Like the Project ☕️

How can I support the project?

For Others Who Have the Skills 👨‍🎓

For Developers Contributors

Usage

How to use this package.

How to login and get account details (for more info see MFA & Security)

webull = webull()
webull.get_mfa('[email protected]')
webull.get_security('[email protected]')
webull.login('[email protected]', 'pa$$w0rd' , 'AnythingYouWant', 'mfa code', 'Security Question ID', 'Security Question Answer')
webull.get_account_id()
webull.get_trade_token('123456')
print(webull.get_account())

How to order stock

webull = webull()
webull.get_mfa('[email protected]')
webull.get_security('[email protected]')
webull.login('[email protected]', 'pa$$w0rd' , 'AnythingYouWant', 'mfa code', 'Security Question ID', 'Security Question Answer')
webull.get_account_id()
webull.get_trade_token('123456')
webull.place_order('NDAQ', 90.0, 2) //stock_ticker_symbol, price, quantity

How to check standing orders

webull = webull()
webull.get_mfa('[email protected]')
webull.get_security('[email protected]')
webull.login('[email protected]', 'pa$$w0rd' , 'AnythingYouWant', 'mfa code', 'Security Question ID', 'Security Question Answer')
webull.get_account_id()
webull.get_trade_token('123456')
orders = webull.get_current_orders()
for order in orders :
  print(order)

How to cancel standing orders

webull = webull()
webull.get_mfa('[email protected]')
webull.get_security('[email protected]')
webull.login('[email protected]', 'pa$$w0rd' , 'AnythingYouWant', 'mfa code', 'Security Question ID', 'Security Question Answer')
webull.get_account_id()
webull.get_trade_token('123456')
orders = webull.get_current_orders()
for order in orders :
  if order['statusCode'] == 'Working' :
    webull.cancel_order(order['orderId'])