Skip to main content

Endpoint

GET /oapi/accounts/:accountId/underlying/balance Returns underlying balance data for an account.

Required path parameters

  • accountId — Trading account ID.

Optional query parameters

  • symbol — Security symbol used to calculate trading availability. Example: ACB
  • quotePrice — Quote price used to calculate balance values for the requested symbol. Example: 23000

Response fields

  • s (string) — Request status. Always returns ok.
  • d (array) — Balance rows.

Balance fields

  • acctno (string) — Trading sub-account number.
  • symbol (string) — Security symbol used for the calculation when symbol is provided.
  • ppse (string) — Buying power.
  • ppsemin (string) — Minimum buying power value.
  • mrrate (string) — Account ratio.
  • maxqtty (string) — Maximum buy quantity. Calculated when both symbol and quotePrice are provided. Otherwise returns 0.
  • minqtty (string) — Minimum buy quantity.
  • trade (string) — Available trading quantity for the requested symbol. Calculated when both symbol and quotePrice are provided. Otherwise returns 0.
  • receiving (string) — Pending receiving securities.
  • mrratioloan (string) — Loan ratio.
  • mrpriceloan (number) — Loan price.
  • allbalance (string) — Cash plus bank balance.
  • avladvance (string) — Advanceable cash amount.
  • ppseref (string) — Optimized buying power.
  • rtt (string) — Real-time ratio.
  • mrirate (string) — Safety ratio.
  • blocked (string) — Blocked securities quantity.
  • mortage (string) — Pledged securities quantity.

cURL

curl "$BASE_URL/oapi/accounts/$ACCOUNT_ID/underlying/balance" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Or with symbol and quote price:
curl "$BASE_URL/oapi/accounts/$ACCOUNT_ID/underlying/balance?symbol=ACB&quotePrice=23000" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Example response

This example omits optional query parameters. In this case, maxqtty and trade return 0.
{
  "s": "ok",
  "d": [
    {
      "ppse": 944754,
      "ppseref": 944754,
      "mrratioloan": "---",
      "mrpriceloan": "---",
      "maxqtty": 0,
      "trade": 0,
      "receiving": 0,
      "rtt": 124.82,
      "allbalance": 0,
      "avladvance": 0,
      "mrirate": 100,
      "blocked": 0,
      "mortage": 0
    }
  ]
}
Field names are documented in lower_case here, as requested.
Replace BASE_URL, ACCOUNT_ID, and ACCESS_TOKEN with your values.