Skip to main content

Webull API Setup (US Stocks)

Connect KhunQuant to your Webull account to track your US equities portfolio and execute trades.

← Back to Exchange Overview


Step 1: Apply for Webull OpenAPI

Before generating API keys, you need to apply for OpenAPI access with Webull.

  1. Log in to your Webull account and navigate to the API portal.

  2. Read and accept the API Agreement and Risk Disclosure (ข้อตกลงการใช้งาน Webull API และการเปิดเผยความเสี่ยง).

    Webull API Agreement

  3. Submit your application. The review process typically takes 1-3 business days. You can track your application status under จัดการ API (Manage API) -> ข้อมูลการสมัครของฉัน (My Application Data).

    Webull Application Pending

Step 2: Generate API Keys

  1. Once your application is approved, return to the ข้อมูลการสมัครของฉัน page.
  2. Click on ยื่นคำขอ API Keys (Apply for API Keys) to generate your credentials.
  3. Securely store your App Key and App Secret. You will need them for KhunQuant.
  4. Also, take note of your Webull Account ID which is required to route trades correctly.

Step 3: Configure KhunQuant

In your config.yaml, add the Webull configuration using the credentials you obtained.

exchanges:
webull:
enabled: true
accounts:
- name: "my_webull"
account_id: "YOUR_ACCOUNT_ID"
api_key: "YOUR_APP_KEY"
secret: "YOUR_APP_SECRET"

If you prefer using .env, you can export:

KHUNQUANT_EXCHANGES_WEBULL_ENABLED=true
KHUNQUANT_EXCHANGES_WEBULL_ACCOUNTS_0_ACCOUNT_ID=YOUR_ACCOUNT_ID
KHUNQUANT_EXCHANGES_WEBULL_ACCOUNTS_0_API_KEY=YOUR_APP_KEY
KHUNQUANT_EXCHANGES_WEBULL_ACCOUNTS_0_SECRET=YOUR_APP_SECRET