---
spec: trading.yaml
operationId: getPositions
---

Return all open positions for the specified account.

## Response Examples

```json 200
{
  "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 }
      ]
    }
  ]
}
```

```json error
{
  "s": "invalid_grant",
  "errmsg": "Invalid grant, the account may not exist or may not be opened yet."
}
```
