Skip to main content

Quick Start


  • Please first generate the app key and app secret on the Webull official website.
  • Requirements for Programming language version:

Requires Python 3.7 and above.

SDK Description

Package dependency description

Packages that must be installed regardless of which product's development kit is used.

  • webull-python-sdk-core

Packages that must be installed to use market subscription products.

  • webull-python-sdk-quotes-core

Packages that must be installed when subscribing to products using trade events.

  • webull-python-sdk-trade-events-core

Packages that need to be installed by default for the complete use of quotes SDK.

  • webull-python-sdk-core
  • webull-python-sdk-quotes-core
  • webull-python-sdk-mdata

Packages that need to be installed by default for the complete use of the trading SDK.

  • webull-python-sdk-core
  • webull-python-sdk-trade-events-core
  • webull-python-sdk-trade

SDK installation

Install via pip

pip3 install --upgrade webull-python-sdk-core
pip3 install --upgrade webull-python-sdk-quotes-core
pip3 install --upgrade webull-python-sdk-mdata
pip3 install --upgrade webull-python-sdk-trade-events-core
pip3 install --upgrade webull-python-sdk-trade

API Host


The Http API address is used for normal Http requests.

The trading alerts is used for real-time pushes such as order status changes.

The push address for the market news is used for receiving the pushes for real-time market news.

Production Environment

Trading news push:
Market news push:

Examples of API calls


The following interfaces are listed, and the default connection address is the production environment.

Http interface list

from webullsdkcore.client import ApiClient
from webullsdktrade.api import API
from webullsdkcore.common.region import Region

your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"
api_client = ApiClient(your_app_key, your_app_secret, Region.US.value)
api = API(api_client)
if __name__ == '__main__':
res = api.account.get_app_subscriptions()
account_id = None
if res.status_code == 200:
print('app subscriptions:', res.json())
result = res.json()
account_id = result[0]['account_id']
print("account id:", account_id)

if account_id is None:
print("account id is null")

Examples of trading pushes

import logging

from webullsdktradeeventscore.events_client import EventsClient
from webullsdkcore.common.region import Region

your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"
account_id = "<your_account_id>"

def _on_log(level, log_content):
print(logging.getLevelName(level), log_content)

if __name__ == '__main__':
client = EventsClient(your_app_key, your_app_secret, Region.US.value)
client.on_log = _on_log
print("subscribe account", [account_id])

Push list of market news

from webullsdkmdata.common.category import Category
from webullsdkmdata.common.subscribe_type import SubscribeType
from webullsdkmdata.quotes.subscribe.default_client import DefaultQuotesClient
from webullsdkcore.common.region import Region

your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"

def pt_logs(client, userdata, level, buf):
print("userdata:%s, level:%s, buf:%s" % (userdata, level, buf))

def on_message(client, userdata, message):
print("Received message '" + str(message.payload) + "' on topic '"
+ message.topic + "' with QoS " + str(message.qos))

if __name__ == '__main__':
client = DefaultQuotesClient(your_app_key, your_app_secret, Region.US.value)
client.on_log = pt_logs
client.on_message = on_message

Feedback and Communication

You can contact us through the Webull API service email address: