BrokerAPI is an institution-grade API for Brokers. It supports Server-to-Server integrations and can also power a Broker’s self-built administration system. Authorization is scoped to the Broker, so one credential covers the approved institutional data and SaaS back-office capabilities.
In both scenarios, API requests must originate from a Broker-controlled server. Institution credentials such as Access Keys must never be stored in browser code or Broker App. A self-built administration UI calls BrokerAPI through Broker Server.
| Caller | Broker Server or the server behind a self-built Broker administration UI |
| Authorization subject | Broker (Broker-scoped Authorization) |
| Private data scope | Approved broker-wide scope |
| Form | HTTPS API for Server-to-Server integration and self-built administration systems |
BrokerAPI includes capabilities developed through two paths: purpose-built Server-to-Server integrations and existing Whale Console workflows opened as APIs. You can use the request path to understand an API’s design:
| Path pattern | Positioning | Typical capabilities |
|---|---|---|
Contains /whaleapi/ |
Originally designed for Whale tenants integrating their servers with Whale. These APIs have a long production history and continue to support live integrations. | Direct Server-to-Server queries and business operations |
Contains /datasets/ |
Organized from existing Whale Console capabilities. Most use the general, configuration-driven Dataset framework. | List queries, filters, pagination, and optional export |
| Other paths | Dedicated APIs used by individual Whale Console features when the Dataset model is not suitable. | State changes, workflow actions, and detail queries |
This classification describes how an API was designed, not whether it is newer or preferred. The API families are complementary; choose the operation that matches the data and workflow you need.
Dataset query APIs are read-only and use GET by default. If the encoded filters and other query parameters are too large for a practical URL query string, send the same parameters as a JSON body with POST to the same path. Neither method modifies business data.
- Acting as a single end client — use TradingAPI (planned) or OpenAPI ↗ instead
- Embedding a client trading UI — use WhaleSDK
| Environment | Base URL |
|---|---|
| Test | https://b-api.longbridge.xyz |
| Production | https://b-api.lbkrs.com |
- Quickstart — make your first request
- Authentication — required headers and credentials
- Headers — content type, locale, and request metadata
- Browse the API Reference groups in the sidebar, organized by business domain