The positions API provides information about an account’s current open positions. The response will include information such as cost basis, shares traded, and market value, which will be updated live as price information is updated. Once a position is closed, it will no longer be queryable through this API.
Sample Position Object
{
"asset_id": "904837e3-3b76-47ec-b432-046db621571b",
"symbol": "AAPL ",
"exchange": "NASDAQ",
"asset_class": "us_equity",
"avg_entry_price": "100.0",
"qty": "5",
"qty_available": "4",
"side": "long",
"market_value": "600.0",
"cost_basis": "500.0",
"unrealized_pl": "100.0",
"unrealized_plpc": "0.20",
"unrealized_intraday_pl": "10.0",
"unrealized_intraday_plpc": "0.0084",
"current_price": "120.0",
"lastday_price": "119.0",
"change_today": "0.0084"
}
Properties
Attribute | Type | Description |
---|---|---|
asset_id | string | The ID of the asset |
symbol | string | The symbol of the position |
exchange | string | The exchange in which the position trades |
asset_class | string | The asset_class of the position. Can either be us_equity or crypto . |
avg_entry_price | string | Average entry price of the position |
qty | string | The number of shares |
qty_available | string | Total number of shares available minus open orders |
side | string | Either long or short |
market_value | string | Total dollar amount of the position |
cost_basis | string | Total cost basis in dollar |
unrealized_pl | string | Unrealized profit/loss in dollars |
unrealized_plpc | string | Unrealized profit/loss percent (by a factor of 1) |
unrealized_intraday_pl | string | Unrealized profit/loss in dollars for the day |
unrealized_intraday_plpc | string | Unrealized profit/loss percent (by a factor of 1) |
current_price | string | Current asset price per share |
lastday_price | string | Last day’s asset price per share based on the closing value of the last trading day |
change_today | string | Last day’s asset price per share based on the closing value of the last trading day |