BrokerAPI authenticates every request with an ACCESS_TOKEN: put your broker’s ACCESS_TOKEN in the Authorization header with the Bearer scheme.
| Header | Value | Example |
|---|---|---|
Authorization |
Bearer ACCESS_TOKEN |
Bearer ${access_token} |
Content-Type |
Content type | application/json; charset=utf-8 |
curl --request POST \
--url https://b-api.longbridge.xyz/v1/datasets/account_cash_balances \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json; charset=utf-8" \
--data '{"filters": {}, "page": 1, "page_size": 20}'The ACCESS_TOKEN is a broker-level credential (Broker-scoped Authorization — it covers your organization’s approved data scope). A broker administrator creates it in the console:
- Go to Global Settings → Identity Management → API Token.
- Click New Token (top right). In the Create Access Token dialog, fill in:
- Name: a label for its purpose (e.g. reconciliation service, market-data sync). 2–30 characters. The name also serves as the service account name — unique within the tenant and not reusable after deletion.
- Expiry: choose as needed (e.g.
1 day).
- Click Create. The full
ACCESS_TOKENis shown only once — copy and store it immediately. It cannot be viewed again after you close the dialog; if lost, you can only create a new one.
After creation, the API Token list shows the key name, key prefix, status, expiry, last-used time / IP, and creation time, with per-token actions to edit, reset, enable / disable, or delete.
The ACCESS_TOKEN grants broker-level data access. Keep it safe: use it server-side only, and never embed it in client code, logs, or version control. If you suspect it has leaked, contact Longport Whale immediately to rotate the credential.