Submit Order
submit_orderSubmit buy or sell orders through a two-step process: generate a dry-run preview first, then execute using the returned single-use confirmation code.
Instructions
Submit a buy/sell order. DRY RUN unless execute is the confirmation_code from its own dry run: call once without execute, show the preview to the user, then re-call quoting the code only after they explicitly confirm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Buy or Sell | |
| remark | No | Order remark (max 255 characters) | |
| symbol | Yes | Security symbol, e.g. "700.HK" | |
| execute | No | The `confirmation_code` from this order's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed that exact order. The code is single use, expires in 10 minutes, and applies only to this exact order — change any field and it stops working. Never quote it back on your own initiative, and never in the same turn the user first asks. | |
| order_type | Yes | Order type (HK supports all; US supports LO/MO/LIT/MIT/TSLPAMT/TSLPPCT only): - LO (Limit Order): requires submitted_price - ELO (Enhanced Limit Order, HK only): requires submitted_price - MO (Market Order): no price required - AO (At-auction Order, HK only): executed at auction price, no price required - ALO (At-auction Limit Order, HK only): requires submitted_price - ODD (Odd Lots Order, HK only): requires submitted_price, for non-standard lot sizes - LIT (Limit If Touched): requires submitted_price and trigger_price; activates when market price touches trigger_price - MIT (Market If Touched): requires trigger_price only; executes at market when trigger_price is touched - TSLPAMT (Trailing Limit If Touched by Amount): requires trailing_amount and limit_offset; trailing stop by fixed amount - TSLPPCT (Trailing Limit If Touched by Percent): requires trailing_percent (0-1) and limit_offset; trailing stop by percentage - SLO (Special Limit Order, HK only): requires submitted_price; cannot be replaced after submission | |
| expire_date | No | Expiry date (yyyy-mm-dd). Required when time_in_force is GTD | |
| outside_rth | No | Outside regular trading hours: "RTH_ONLY" (regular trading hours only), "ANY_TIME" (any time including pre/post market), "OVERNIGHT" (overnight session, US only) | |
| limit_offset | No | Limit offset from the trailing stop price. Required for: TSLPAMT, TSLPPCT | |
| time_in_force | Yes | Order validity: "Day" (Day Order, expires end of session), "GTC" (Good Til Canceled), "GTD" (Good Til Date, requires expire_date) | |
| trigger_price | No | Trigger (activation) price. Required for: LIT, MIT, TSLPAMT, TSLPPCT | |
| submitted_price | No | Limit price. Required for: LO, ELO, ALO, ODD, LIT, SLO | |
| trailing_amount | No | Trailing amount (absolute price distance). Required for TSLPAMT | |
| trailing_percent | No | Trailing percent as decimal (e.g. 0.05 = 5%). Required for TSLPPCT | |
| submitted_quantity | Yes | Order quantity (number of shares) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | ||
| preview | No | ||
| order_id | No | ||
| next_step | No |