Add Several to Portfolio
add_to_watchlist_batchAdd a list of companies the person gave you, up to 100 rows, to one of their StockLens portfolios, in two calls. First call with confirm false: nothing is added and every row returns its outcome. Relay summary_line and message, then every row that is not a plain add, grouped by outcome, and name the plain adds in one line; name the portfolio only when portfolio_count is above 1. Ask which rows to add. Then call with confirm true, the preview_id, the same rows, the same portfolio and the confirmed_indexes the person approved. Send only rows the person gave you. For an ambiguous row, ask which listing using its candidates; never pick one. Add a not_covered row only if the person asks for it. A changed list or a different portfolio needs a new preview; preview_mismatch means the preview expired or no longer matches, so preview again. Without portfolio_id or portfolio_name it uses the default portfolio. It does not trade, record holdings or move money.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The companies the person gave you, one per row, in their order. Never add a row they did not name. | |
| confirm | Yes | false previews the list and adds nothing. true adds the rows of confirmed_indexes from the preview that preview_id names. | |
| preview_id | No | The preview_id the preview returned. Required when confirm is true. | |
| portfolio_id | No | The id of the portfolio to add to, as get_portfolio_insights lists it. Optional: without it or portfolio_name the list goes to the default portfolio. | |
| portfolio_name | No | The name of the portfolio to add to, as the person names it (exact, case does not matter). Optional. | |
| confirmed_indexes | No | The index of every row the person approved, from the preview. Required when confirm is true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | ||
| scope | Yes | ||
| reason | No | ||
| status | Yes | ||
| message | No | ||
| summary | No | ||
| capacity | No | ||
| next_step | No | ||
| is_default | No | ||
| portfolios | No | ||
| preview_id | No | ||
| portfolio_id | No | ||
| summary_line | No | ||
| company_count | No | ||
| portfolio_name | No | ||
| portfolio_count | No |