Edit portfolio order
edit_orderChange an open portfolio order. Use this before cancel_order.
Attach or replace the investment case with library_item_id. That is the
document id. search_library returns it as item_id. list_library_items
returns it as id. Pass the id, not the title. An empty library_item_id
removes the case. The accept card and the book show it.
qty, price, expires_kind (day, gtc, or delete_after), expires_at,
after_hours, and library_item_id. Send only the fields that change.
Rules still apply. HIL on,
or an order above Skip HIL up to, opens the accept card again. A day
order needs an open session. A good till that lasts past the next open
can stay open while the session is closed.
Args:
portfolio_id: The portfolio UUID
order_id: The order UUID
qty: New share count
price: New price, or the new limit
expires_kind: day, gtc (90 days), or delete_after
expires_at: Required with delete_after. Naive times are New York.
after_hours: Extended session for a stock or ETF
library_item_id: The investment case. The document id from search_library
(item_id) or list_library_items (id). Not the title. An empty string removes the case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | ||
| price | No | ||
| order_id | Yes | ||
| expires_at | No | ||
| after_hours | No | ||
| expires_kind | No | ||
| portfolio_id | Yes | ||
| library_item_id | No | Investment case to attach or replace. Pass the document id, not the title. search_library returns it as item_id. list_library_items returns it as id. An empty string removes the case. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |