Prepare stock order
toss_prepare_orderPreview a new market or limit order to buy or sell a stock. Validates the request and returns a confirmation token for later submission after user approval.
Instructions
Previews a NEW market or limit order to buy or sell one stock immediately. For trigger-based orders use toss_prepare_conditional_order; to change or withdraw an order that already exists use toss_prepare_order_modify or toss_prepare_order_cancel. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | BUY to open or increase a position, SELL to reduce or close one. | |
| price | No | Limit price as a positive decimal string. Required for LIMIT, rejected for MARKET. | |
| symbol | Yes | Korean 6-digit code (e.g. '005930') or US ticker (e.g. 'NVDA'). Call toss_resolve_symbol first if you only have a company name. | |
| quantity | No | Share count as a positive decimal string. Provide exactly one of `quantity` or `orderAmount`. | |
| orderType | Yes | LIMIT executes only at `price` or better and requires `price`. MARKET executes at the prevailing price and must omit `price`. | |
| orderAmount | No | Cash amount to spend instead of a share count, as a positive decimal string. Valid only for MARKET orders. Provide exactly one of `quantity` or `orderAmount`. | |
| timeInForce | No | DAY keeps the order working for the current session; CLS routes it to the closing auction. Defaults to DAY when omitted. |