Position API

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.

[GET] Get open positions

GET/v1/positions
Retrieves a list of the account’s open positions.

Response

An array of Position object

[GET] Get an open position

GET/v1/positions/{symbol}
Retrieves the account’s open position for the given symbol.

Parameters

Path Parameters

symbol
string
symbol or asset_id

Response

A Position object

Errors

404 Not found
Position is not found.

Position Entity

Example

{
  "asset_id": "904837e3-3b76-47ec-b432-046db621571b",
  "symbol": "AAPL",
  "exchange": "NASDAQ",
  "asset_class": "us_equity",
  "avg_entry_price": "100.0",
  "qty": "5",
  "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

asset_id
string<uuid>
Asset ID
symbol
string
Symbol name of the asset
exchange
string
Exchange name of the asset
asset_class
string
Asset class name
avg_entry_price
string
Average entry price of the position
qty
string<int>
The number of shares
side
string
“long”
market_value
string<number>
Total dollar amount of the position
cost_basis
string<number>
Total cost basis in dollar
unrealized_pl
string<string>
Unrealized profit/loss in dollar
unrealized_plpc
string<number>
Unrealized profit/loss percent (by a factor of 1)
unrealized_intraday_pl
string<number>
Unrealized profit/loss in dollar for the day
unrealized_intraday_plpc
string<number>
Unrealized profit/loss percent (by a factor of 1)
current_price
string<number>
Current asset price per share
lastday_price
string<number>
Last day’s asset price per share
change_today
string<number>
Percent change from last day price (by a factor of 1)