v1

latestOpenAPI 3.0.02026-07-26166415635.8 KB
Trading

List Open Positions for an Account

List open positions for an account

get/v1/trading/accounts/{account_id}/positions

Response

Success

asset_class'us_equity' | 'us_option' | 'crypto' | 'ipo' required

This represents the category to which the asset belongs to. It serves to identify the nature of the financial instrument, with options including "us_equity" for U.S. equities, "us_option" for U.S. options, "crypto" for cryptocurrencies, and "ipo" for IPO indications of interest. This asset_class: ipo value is distinct from the assets API attributes: ["ipo"] flag.

asset_idstring uuid required

Asset ID (For options this represents the option contract ID)

asset_marginableboolean

Indicates if this asset is marginable

avg_entry_pricestring required

Average entry price of the position

avg_entry_swap_ratestring decimal

The average swap rate of the position. This is only returned for LCT accounts.

change_todaystring decimal required

Percent change from last day price (by a factor of 1)

cost_basisstring decimal required

Total cost basis

current_pricestring decimal required

Current asset price per share

exchangestring required

Exchange name of the asset

lastday_pricestring decimal required

Last day's asset price per share based on the closing value of the last trading day

market_valuestring decimal required

Total market value of the position

qtystring required

The number of shares

qty_availablestring required

Total number of shares available minus open orders / locked for options covered call

side'long' | 'short' required
swap_ratestring decimal

The latest swap rate. This is only returned for LCT accounts.

symbolstring required

Asset symbol

unrealized_intraday_plstring decimal required

Unrealized profit/loss for the day

unrealized_intraday_plpcstring decimal required

Unrealized interday profit/loss percent (by a factor of 1)

unrealized_plstring decimal required

Unrealized profit/loss

unrealized_plpcstring decimal required

Unrealized profit/loss percent (by a factor of 1)

Example response

[
  {
    "asset_id": "904837e3-3b76-47ec-b432-046db621571b",
    "avg_entry_price": "100.0",
    "avg_entry_swap_rate": "1.40",
    "change_today": "0.0084",
    "cost_basis": "500.0",
    "current_price": "120.0",
    "exchange": "NASDAQ",
    "lastday_price": "119.0",
    "market_value": "600.0",
    "qty": "5",
    "qty_available": "5",
    "side": "long",
    "swap_rate": "1.50",
    "symbol": "AAPL",
    "unrealized_intraday_pl": "10.0",
    "unrealized_intraday_plpc": "0.0084",
    "unrealized_pl": "100.0",
    "unrealized_plpc": "0.20",
    "usd": {
      "avg_entry_price": "71.43",
      "change_today": "0.67",
      "cost_basis": "333.33",
      "current_price": "80.0",
      "lastday_price": "79.33",
      "market_value": "400.00",
      "unrealized_intraday_pl": "6.67",
      "unrealized_intraday_plpc": "0.0084",
      "unrealized_pl": "66.67",
      "unrealized_plpc": "0.2"
    }
  }
]