POST /api/v1/orders/pending places a pending order. It requires the
POST:/api/v1/orders/pending scope, a verified account, trading enabled, and
Idempotency-Key. A token restricted to /orders/market does not grant this scope.
Supported types
For immediate buys/sells (types 0 and 1), use market orders.
Request
volume is an integer in MT5 units:
100 equals 0.01 lots. There is no conversion from lots.
login, symbol, volume, order_type, and price are required.
comment is optional, accepts up to 31 characters, and defaults to REST API.
digits is resolved automatically; do not send it.
For stop-limit orders, also provide the required stop_limit_price:
stop_limit_price. The backend maps price to PriceOrder and
stop_limit_price to PriceTrigger.
Validation and lifetime
The backend queries effective symbol settings for the account and validates volume minimum, maximum, and step; allowed order type and direction; and price decimals and tick size. It does not round or change the requested volume. Prices must be positive and finite. Additional fields produce422.
This version uses GTC (TypeTime=0) and RETURN (TypeFill=2) and requires
GTC support for the symbol. Custom expiration dates are not exposed. Optional sl and tp are supported.
Broker rules may cancel orders; GTC does not guarantee indefinite persistence.
MT5 checks margin, sessions, distances, and price placement when processing the order.
Submission and tracking
Save the body aspending.json and use a separate key for each intent.
answer.id or answer.ID and query the result.
The initial response confirms receipt, not placement or execution.
Then query GET /api/v1/accounts/{login}/orders for active orders.
Use cancel pending order to request cancellation.
Modify pending orders with POST /api/v1/orders/{order}/modify; see the modification workflow. Revoking verification does not cancel existing orders.
Idempotency also applies here. Do not change keys to repeat
a request with an uncertain outcome. A reservation may remain pending after lookup
or validation failures before submission.
Optional SL and TP
sl and tp are absolute prices. Send either or both when opening; omitted or
null values are not sent, and 0 specifies no level. Precision and distances
are validated; invalid prices are not rounded.
Pending protection uses price as reference, or stop_limit_price for stop-limit.
Modify orders or positions · MT5 volume units
