Get portfolio positions
get_positionsGet current holdings with quantity, cost basis, market value, and unrealized P&L.
A short has negative shares, a positive avg_cost, a negative total_cost_book
(the open credit), and a negative market value. Unrealized profit is positive.
Cash includes short proceeds and is reduced when the short owes a dividend.
Open cost of a long is already net of dividends still held. Realized P&L
from closed longs and shorts is on get_portfolio_statistics.
Args:
portfolio_id: The portfolio UUID
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"portfolio_id": "<portfolio_id>"
},
"name": "get_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy_id | No | Strategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy. | |
| portfolio_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |