Order Management
3 tools — auto-generated from the MCP server's tool schemas.
Generated
This page is generated from packages/server/mcp/src/tools/*.ts by pnpm docs:generate-tools. Do not edit it by hand — edit the tool's description/schema in source and regenerate.
cancel_order
Cancels a pending (limit or stop) order by ticket. Defaults to dry_run=true — set dry_run=false to execute live. Returns ORDER_NOT_FOUND if the ticket is not in pending orders. Requires the trade capability and inp_AllowTrading=true on the EA.
This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ticket | integer | Yes | — | — |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |
modify_order
Modifies the price, stop_loss, take_profit, or expiry of a pending order. At least one of price, stop_loss, take_profit, or expiry must be provided. Defaults to dry_run=true — set dry_run=false to execute live. Requires the trade capability and inp_AllowTrading=true on the EA.
This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ticket | integer | Yes | — | — |
price | number | No | — | — |
stop_loss | number | No | — | — |
take_profit | number | No | — | — |
expiry | integer | No | — | — |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |
partial_close
Closes a portion of an open position. volume must be less than the full position volume. Defaults to dry_run=true — set dry_run=false to execute live. Returns INVALID_PARAMETER if volume >= position volume, POSITION_NOT_FOUND if position closed between dry-run and live call. Requires the trade capability and inp_AllowTrading=true on the EA.
This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ticket | integer | Yes | — | — |
volume | number | Yes | — | — |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |