Modify an open order
tossinvest_modify_orderModify an existing working order's price or quantity (Korean stocks only) to match new terms, with mandatory confirmation for high-value orders.
Instructions
Change the price (and, for Korean stocks, the quantity) of a working order. This alters a REAL order — confirm the new terms with the user first.
Args:
order_id (string): the order to modify. Must still be working; get it from tossinvest_list_orders with status='OPEN'.
order_type ('LIMIT' | 'MARKET'): the resulting order type.
quantity (string, optional): REQUIRED for Korean stocks, whole numbers only. MUST BE OMITTED for US stocks, which reject it with 400 us-modify-quantity-not-supported. US modifications can only change price.
price (string, optional): REQUIRED for LIMIT, forbidden for MARKET. Same tick/decimal rules as placing an order.
confirm_high_value_order (boolean): default false. Required true at ₩100,000,000 or more. Orders of ₩3,000,000,000 or more are rejected regardless.
account_seq (number, optional): resolved automatically for single-account credentials.
response_format ('markdown' | 'json'): default 'markdown'.
Returns { accountSeq, orderId, operation: 'modified' }.
Errors: 409 already-filled / already-canceled / already-modified / already-processing, 422 modify-restricted, 404 order-not-found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | No | New limit price. Required for LIMIT, forbidden for MARKET. | |
| order_id | Yes | Identifier of the working order to modify. | |
| quantity | No | New share count. Required for KR (whole numbers); must be omitted for US. | |
| order_type | Yes | Resulting order type. 'LIMIT' needs `price`; 'MARKET' must omit it. | |
| account_seq | No | accountSeq of the account to act on (the `X-Tossinvest-Account` header). Optional: falls back to TOSSINVEST_ACCOUNT_SEQ, then to the sole account on the credentials. Get valid values from tossinvest_list_accounts. | |
| response_format | No | Output format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload. | markdown |
| confirm_high_value_order | No | Set true to acknowledge an order of ₩100,000,000 or more; such orders are rejected with `confirm-high-value-required` otherwise. Only set this after the user has confirmed the amount. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| orderId | Yes | Identifier of the resulting order | |
| operation | Yes | created, modified or canceled | |
| accountSeq | Yes |