DocsAPI ReferencePositions & TradingPositions

Positions

What you hold right now across every connected broker, with each option valued at the live quote: bid, ask, mid and an estimated contract value.

List positions

GET/positions

Stocks and options from every connected broker plus your Manual Journal and CSV accounts, the same list the Positions tab shows. Hidden positions stay hidden. The MCP tool get_positions returns the same payload. For the best roll on each open option, see rolls for your positions.

Parameters
accountIdstring
Limit to one account.
curl -H "Authorization: Bearer qw_live_YOUR_KEY" \
  "https://quantwheel.com/api/v1/positions"
200 OK
{
  "asOf": "2026-10-22T14:59:12.000Z",
  "potentiallyStale": false,
  "accounts": [
    { "id": "acc_1", "name": "Schwab", "broker": "Schwab", "cash": 48210.55, "buyingPower": 48210.55, "currency": "USD" }
  ],
  "totals": { "optionsEstimatedMarketValue": -565, "optionsUnrealizedPnl": 35, "stocksMarketValue": 23000, "stocksUnrealizedPnl": 3000 },
  "optionPositions": [
    {
      "accountId": "acc_1",
      "symbol": "SPY",
      "contract": "O:SPY261120P00550000",
      "optionType": "PUT",
      "strike": 550,
      "expiration": "2026-11-20",
      "daysToExpiration": 29,
      "side": "short",
      "quantity": -1,
      "averageCostPerShare": 6.0,
      "bid": 5.5,
      "ask": 5.8,
      "mid": 5.65,
      "spreadPct": 0.0531,
      "estimatedValuePerShare": 5.65,
      "estimatedValuePerContract": 565,
      "estimatedMarketValue": -565,
      "costBasis": -600,
      "unrealizedPnl": 35,
      "unrealizedPnlPct": 5.83,
      "priceSource": "mid",
      "quoteTime": "2026-10-22T14:59:08.000Z",
      "delta": -0.31,
      "underlyingPrice": 571.2
    }
  ],
  "stockPositions": [
    { "accountId": "acc_1", "symbol": "AAPL", "quantity": 100, "averageCost": 200, "price": 230,
      "marketValue": 23000, "costBasis": 20000, "unrealizedPnl": 3000, "unrealizedPnlPct": 15, "priceStale": false }
  ]
}

How options are valued

Each contract is priced from its live quote. The estimate is the NBBO midpoint: a short SPY put quoted bid 5.50 / ask 5.80 is worth 5.65 a share, 565 a contract.

priceSourceMeaning
midBoth sides quoted: (bid + ask) / 2.
bid / askOnly one side is quoted; that side is used.
last_trade / day_closeNo quote; the last print, then the day's close.
position_markNo live quote (or a Canadian listing): the broker or cached mark.
Signs and units
Quote prices are per share and contract values are x100. Short positions have a negative quantity, estimatedMarketValue and costBasis, so unrealizedPnl = estimatedMarketValue - costBasis is positive when a short option has lost value.

Key fields

FieldDescription
asOf / potentiallyStaleWhen the broker positions were last synced, and whether they may miss recent trades.
spreadPct(ask - bid) / mid. A wide market makes the estimate less certain.
averageCostPerShareWhat you paid or received per share.
totalsSummed estimated market value and unrealized P&L across options and stocks.
accountsCash and buying power per account.