Positions
get_positionsRetrieve an account's current positions: contract, signed quantity, and average cost including commissions. Uses IBKR-streamed data for up-to-date results.
Instructions
List an account's positions: contract, quantity (negative = short) and average cost.
Fast and always current (IBKR streams position changes). avg_cost includes
commissions and, for options and futures, the multiplier. For market value and
unrealized P&L use get_portfolio; for today's P&L of one position use
get_position_pnl. `contract.exchange` is not reported for positions; use the con_id
for follow-up calls. `model_code` (financial advisors) lists one model's positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | IBKR account id, e.g. DU1234567. Omit to use the default account; list_accounts shows which accounts are allowed. | |
| model_code | No | Financial-advisor model code, to scope the result to one model portfolio. Omit for the whole account (normal for non-advisor accounts). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | Yes | When this server read the values (UTC). | |
| account | Yes | ||
| positions | Yes | ||
| model_code | No |