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.

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. Known IDs: dayBP, overnightBP, daytradeLeft, marginRequirement, dayTradeTimes.

d.customFields[].idstring

Field identifier.

d.customFields[].valueobject

Field value.

Response

401application/json

Unauthorized — missing or invalid authentication.

sstring

Error code string, e.g. invalid_grant.

errmsgstring

Human-readable error message.

Response

errorapplication/json

Error response.

sstring

Error code string, e.g. invalid_grant.

errmsgstring

Human-readable error message.

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