Skip to content
Longport Whale
Get Started

Authentication

ACCESS_TOKEN based request authentication

Broker API authenticates every request with an ACCESS_TOKEN: put your broker’s ACCESS_TOKEN in the Authorization header with the Bearer scheme.

Required Headers

Header Value Example
Authorization Bearer ACCESS_TOKEN Bearer ${access_token}
Content-Type Content type application/json; charset=utf-8

Example Request

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}'

Obtaining Credentials

The ACCESS_TOKEN is issued per broker by Longport Whale (Broker-scoped Authorization — it covers your organization’s approved data scope).

Whale Docs