Get Positions

GET/accounts/{accountId}/positions

Return all open positions 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[]

Array of open positions.

d[].idstring

Unique position identifier. Example: U000016649-sell.

d[].instrumentstring

Ticker symbol. Example: AAPL.

d[].namestring

Security name. Example: Apple.

d[].securityTypestring

Asset class. Enum: stock; etf; option; future; crypto.

d[].sidestring

Position direction. Enum: buy — long; sell — short.

d[].qtynumber

Position size in shares. Negative for short positions.

d[].lastnumber

Last traded price.

d[].closenumber

Previous session close price.

d[].avgPricenumber

Average cost per share.

d[].mktnumber

Current market value of the position.

d[].changenumber

Absolute price change from previous close.

d[].changePctnumber

Percentage price change from previous close.

d[].unrealizedPLnumber

Unrealized profit/loss in account currency.

d[].unrealizedPLPnumber

Unrealized profit/loss as a decimal fraction (e.g. -0.3886 = -38.86%).

d[].dayPLnumber

Intraday profit/loss.

d[].dayPLPnumber

Intraday profit/loss as a decimal fraction.

d[].exchangestring

Exchange identifier.

d[].unitnumber

Contract unit size.

d[].weightnumber

Portfolio weight of the position.

d[].customFieldsobject[]

Additional computed fields. Each entry has id (string) and value (number). Known IDs: breakEvenPrice, holdingDays.

Response Example

{
  "s": "ok",
  "d": [
    {
      "id": "U000016649-sell",
      "instrument": "AAPL",
      "name": "Apple",
      "securityType": "stock",
      "side": "sell",
      "qty": -75.2,
      "last": 261.7179,
      "close": 255.78,
      "avgPrice": 188.4730752401,
      "mkt": -19681.19,
      "change": 5.9379,
      "changePct": 0.0232,
      "unrealizedPL": -5508.0108,
      "unrealizedPLP": -0.3886,
      "dayPL": 0,
      "dayPLP": 0,
      "exchange": "185",
      "unit": 1,
      "weight": 0,
      "customFields": [
        { "id": "breakEvenPrice", "value": 88.3581150266 },
        { "id": "holdingDays",    "value": 595 }
      ]
    }
  ]
}