Get Account Balance

GET/accounts/{accountId}/state

Return the current balance and buying-power snapshot for the specified account.

Path Parameters

accountIdstringrequired

The account identifier.

Response

200application/json

Successful response in standard envelope.

sstring

Status indicator. ok on success.

dobject

Account state snapshot.

d.cashnumber

Cash balance. Negative when the account carries margin debt.

d.equitynumber

Total account equity (cash + market value of positions).

d.mktnumber

Total market value of all open positions.

d.dayPLnumber

Intraday profit/loss in account currency.

d.dayPLPnumber

Intraday profit/loss as a decimal fraction (e.g. -0.1117 = -11.17%).

d.unrealizedPLnumber

Total unrealized profit/loss across all open positions.

d.customFieldsobject[]

Additional computed fields. Each entry has id (string) and value (number | string).

d.customFields[].idstring

Field identifier. Known values: dayBP, overnightBP, daytradeLeft, marginRequirement, dayTradeTimes.

d.customFields[].valuenumber | string

Field value. Numeric for most fields; "Unlimited" for daytradeLeft when the account has no day-trade restriction. - dayBP — intraday buying power. - overnightBP — overnight buying power. - daytradeLeft — remaining same-day round trips ("Unlimited" or a number). - marginRequirement — current margin requirement. - dayTradeTimes — number of day trades executed today.

Response Example

{
  "s": "OK",
  "d": {
    "cash": -741504.84,
    "equity": 1015356.46,
    "mkt": 1756861.30,
    "dayPL": -127711.66,
    "dayPLP": -0.1117,
    "unrealizedPL": 212276.61,
    "customFields": [
      { "id": "dayBP",             "value": 1447119.17 },
      { "id": "overnightBP",       "value": 835568.39  },
      { "id": "daytradeLeft",      "value": "Unlimited" },
      { "id": "marginRequirement", "value": 427607.33  },
      { "id": "dayTradeTimes",     "value": 0          }
    ]
  }
}