webull-sdk 1.0.0
Webull SDK, for D!
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Webull
Webull is a D library for the Webull OpenAPI, providing authenticated access to market data including real-time quotes, OHLCV bars, tick data, and order book depth for equities, options, crypto, and futures.
Features
Authentication
- HMAC-SHA1 Signing - Automatic request signing with app key/secret
- Token Lifecycle - Create, poll, and cache authentication tokens with MFA support
- Permission Detection - Runtime probing of available API permissions
Market Data
- Bars - OHLCV candlestick data with configurable timespans (M1 through yearly)
- Snapshots - Real-time price, volume, and change data with extended/overnight hours
- Order Book - Level-2 quotes with configurable depth
- Ticks - Individual trade records with volume and direction
- Footprint - Delta volume analysis with buy/sell level breakdowns
Security Types
- US Stocks -
US_STOCK - US Options -
US_OPTION - Hong Kong Stocks -
HK_STOCK - China Stocks -
CN_STOCK - Cryptocurrency -
CRYPTO - Futures -
FUTURES
Quick Start
Requirements:
- D compiler (DMD/LDC)
- Webull OpenAPI credentials (key + secret)
Setup:
import webull.client;
import webull.security;
import webull.market;
// Configure credentials
Client.key = "your_app_key";
Client.secret = "your_app_secret";
// Create and authenticate token
Client.createToken((status) {
writeln("Waiting for MFA approval...");
});
// Access market data
auto aapl = new Security("AAPL", Category.US_STOCK);
auto snap = aapl.snapshot();
writeln("AAPL: $", snap.price, " (", snap.changeRatio, "%)");
API Overview
Client
createToken()- Initiate authentication with optional polling callbackcheckToken()- Validate current token statusdetectPermissions()- Probe available API endpoints
Security
autoUpdate- Automatic refresh of cached market databars()- Retrieve OHLCV historysnapshot()- Current quote dataorderBook()- Bid/ask levelsticks()- Recent trades
Market Functions
getBars()- Single or batch bar retrievalgetSnapshot()- Single or batch snapshotsgetOrderBook()- Level-2 market depthgetTicks()- Trade tick historygetFootprint()- Volume delta analysis
Architecture
webull.client- Authentication state and token managementwebull.security- Security objects with auto-updating data accessorswebull.market- Market data endpoints (bars, quotes, ticks, snapshots, footprint)webull.orchestrate- HMAC-SHA1 request signing and HTTP orchestration
Roadmap
- [x] HMAC-SHA1 authentication
- [x] Token lifecycle management
- [x] Bars API (single + batch)
- [x] Snapshots API (single + batch)
- [x] Order book API
- [x] Tick data API
- [x] Footprint API
- [ ] WebSocket streaming
- [ ] Order placement API
- [ ] Account/position queries
License
Webull is licensed under the AGPL-3.0 license.
- 1.0.0 released 4 days ago
- cetio/webull-sdk
- AGPL-3.0-only
- Copyright © 2026, cet
- Authors:
- Dependencies:
- conductor
- Versions:
-
Show all 2 versions1.0.0 2026-Apr-22 ~main 2026-Apr-25 - Download Stats:
-
-
1 downloads today
-
3 downloads this week
-
3 downloads this month
-
3 downloads total
-
- Score:
- 0.0
- Short URL:
- webull-sdk.dub.pm