Skip to main content

deployquant-webull

A broker adapter that lets DQengine trade a Webull US brokerage account through Webull's OpenAPI.

pip install deployquant-webull

That is the whole setup on the DQengine side. The package registers itself, and dqengine brokers then lists webull.

The Webull SDK

The adapter uses Webull's official Python SDK (webull-python-sdk-trade). It only imports the SDK when you connect, so the package installs without it. Install the SDK when you are ready to connect an account.

The SDK's own package metadata does not install on Python 3.12. It pins a grpcio version that has no build for 3.12, and it leaves out webull-python-sdk-mdata, which it needs. This works:

pip install --no-deps \
    webull-python-sdk-core==0.1.18 webull-python-sdk-mdata==0.1.18 \
    webull-python-sdk-trade==0.1.18 webull-python-sdk-trade-events-core==0.1.18
pip install jmespath==1.1.0 cachetools==5.2.0 grpcio

The same versions are declared as the sdk extra (pip install "deployquant-webull[sdk]"). An extra cannot pass --no-deps, so on Python 3.12 use the commands above.

The adapter includes two small fixes the SDK needs on Python 3.12. They are described at the top of dqengine_webull/adapter.py, along with the places where the SDK behaves differently from its documentation.

Credentials

You use your own Webull OpenAPI app key and app secret. Apply for them in the OpenAPI section of your Webull account. The key pair is tied to that account.

The adapter takes them as a creds mapping with app_key, app_secret, account_id and an optional region. It does not store credentials anywhere. Where you keep them is up to you.

No paper trading

This adapter trades real money. US accounts use Webull's v1 order endpoints (/trade/order/place, /trade/order/cancel, /trade/orders/list-open). Webull documents the v2 endpoints as available to Japan and Hong Kong customers only, and Webull's sandbox only serves v2. So there is no working paper environment for a US account.

What the adapter has to get right

DQengine has a conformance test for broker adapters (tests/test_adapter_conformance.py), and this plugin has to pass it. The test checks three things. The adapter declares what it supports correctly: order types, time in force, short selling and extended hours. It refuses an unsupported order before anything is sent to the broker. Every broker error comes back as one of the exception types in dqengine.adapters.base.

License

PolyForm Shield 1.0.0. You can use, change and run it for anything, including trading your own money, except building a product or service that competes with DQengine or with the products built on it. See NOTICE.

Release files for deployquant-webull 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deployquant-webull 0.1.0
File Size Uploaded
deployquant_webull-0.1.0.tar.gz 18.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deployquant-webull 0.1.0
File Interpreter ABI Platform
deployquant_webull-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.2 kB

Release files / deployquant_webull-0.1.0.tar.gz

Download URL deployquant_webull-0.1.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1656cb33dd126a09bfbb0e9fa8b654ca8898339acfbb5644cfe81b6d2a255960
BLAKE2b-256 checksum
How to use checksums
dce8fd2717e3d43beace9626f9c830ada952f9a896d54e213c2b4ec3d92cba19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / deployquant_webull-0.1.0-py3-none-any.whl

Download URL deployquant_webull-0.1.0-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7df5ddebc1965117f761a704aaa577c56904890f0cd03f62e7877fb58861e669
BLAKE2b-256 checksum
How to use checksums
1fd977cdf66420a7c4d04771d5f7ef77036accb425de6483034373561af247ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page