Broker API 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 issued per broker by Longport Whale (Broker-scoped Authorization — it covers your organization’s approved data scope).
Warning
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.