Skip to content
WhaleCore

Overview

WhaleCore capabilities, boundaries, and platform support

WhaleCore is a UI-free securities data SDK. Broker App implements its own interface and uses WhaleCore for client sessions, real-time data, and business services; capabilities the typed services do not cover yet are called through WhaleCore’s requestService() against TradingAPI. TradingAPI is reachable only through WhaleCore — a Broker App or Broker Server that calls it directly fails.

Note
This documentation is derived from public interfaces in the WhaleCore iOS and Android source. Artifact locations, version compatibility, project credentials, and environments are supplied by the Whale project team.

When to use it

Fully custom UI
Broker designs every securities screen and interaction instead of using WhaleAppSDK UI.
Reusable client foundations
The SDK manages sessions, auth recovery, WebSockets, caching, and business data services.

Public capabilities

Module iOS Android Capability
Quotes quoteService() getQuoteService() Real-time quote subscriptions, K-lines, timeshares, historical trades, option-chain / option-detail subscriptions, and quote level with device eviction
Option calculator WhaleCoreOptionCalculator (static utility) OptionCalculator (static utility) Local Black-Scholes calculations: Greeks, theoretical price, intrinsic/time value, days to expiry, and probability of profit
Orders orderService() getOrderService() Submit, replace, cancel, attached orders, take-profit/stop-loss on a position, order preview, estimates, pre-trade validation, trade card selection, and order events
Portfolio portfolioService() getPortfoliosService() Portfolio subscriptions, cash details, member portfolio settings, and profit-and-loss analysis (cross-currency conversion happens inside the SDK; neither platform exposes an exchange-rate lookup API)
Watchlist watchlistService() getWatchlistService() Group and stock CRUD, ordering, pinning, invalid-ticker cleanup, and events
Requests requestService() getRequestService() The only call path to TradingAPI; adds common parameters and auth headers, and recovers and retries on auth expiry
Trade tokens updateTradeToken(_:...) / hasTradeToken() updateTradeToken() / hasTradeToken() Needed only in trade-password verification mode (tradePasswordEnabled at initialization): Broker App verifies the trading password and supplies the trade token. In the default mode the SDK obtains and renews it automatically
Note

The legacy standalone entry points WhaleCoreService.orderValidationService (iOS) and WhaleCore.getOrderValidationService() (Android) are deprecated — call the same-named methods on orderService() / getOrderService() instead.

SDK instrument identifiers use the CounterId form, such as ST/US/AAPL or ST/HK/00700.

Integration model

flowchart LR
    A[Broker App UI] --> B[WhaleCore]
    B --> C[WebSocket connections]
    B --> D[Quotes / orders / portfolio / watchlists]
    B --> E[Automatic token renewal]
    B --> F[requestService]
    F --> G[TradingAPI HTTP]

Platforms

Platform Status Guide
iOS Available; iOS 13+; Swift / Objective-C iOS
Android Available; Kotlin / Java Android
Web Available; WebAssembly in the browser; TypeScript TypeScript
Flutter Available; Android and iOS; Dart Flutter
Whale Docs