Webull API Setup (US Stocks)
Connect KhunQuant to your Webull account to track your US equities portfolio and execute trades.
Step 1: Apply for Webull OpenAPI
Before generating API keys, you need to apply for OpenAPI access with Webull.
-
Log in to your Webull account and navigate to the API portal.
-
Read and accept the API Agreement and Risk Disclosure (ข้อตกลงการใช้งาน Webull API และการเปิดเผยความเสี่ยง).

-
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).

Step 2: Generate API Keys
- Once your application is approved, return to the ข้อมูลการสมัครของฉัน page.
- Click on ยื่นคำขอ API Keys (Apply for API Keys) to generate your credentials.
- Securely store your App Key and App Secret. You will need them for KhunQuant.
- 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