Place a limit or stop order
place_pending_orderPlaces a limit or stop order on the user's real broker account (or demo) that waits at the broker; success means working, not filled. Confirm it with the user first. Example: {"account_id": "", "symbol": "EURUSD", "side": "buy", "kind": "limit", "volume": "0.10", "price": "1.08000", "idempotency_key": ""}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | limit, stop or stop_limit. | |
| side | Yes | buy or sell. | |
| price | Yes | The price the order waits at. An absolute price (e.g. "1.08450"), not a distance in pips or points. | |
| symbol | Yes | The symbol exactly as this broker names it, e.g. "EURUSD" — some brokers add a suffix such as "EURUSD.r". | |
| volume | Yes | Order size. In lots, preferably as a string: "0.01" is a micro lot, "1.00" a standard lot. | |
| comment | No | Optional note stored on the order. MT5 keeps the first 17 characters after our reference. | |
| stop_loss | No | Optional stop loss. An absolute price (e.g. "1.08450"), not a distance in pips or points. | |
| account_id | Yes | The fxapis account id (a UUID) from list_accounts — not the MT5 login number. | |
| expires_at | No | When the broker should drop it. Omit for good-till-cancelled. | |
| take_profit | No | Optional take profit. An absolute price (e.g. "1.08450"), not a distance in pips or points. | |
| client_order_id | No | Optional reference of your own, echoed back on the order. | |
| idempotency_key | Yes | A unique string you generate for THIS action, e.g. a fresh UUID. If a call fails or times out and you retry the same action, send the SAME key: fxapis then returns the first result instead of acting twice. Use a new key only for a genuinely new action. | |
| stop_limit_price | No | Required for stop_limit: the limit placed once the stop triggers. An absolute price (e.g. "1.08450"), not a distance in pips or points. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes |