Trading
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.
close_position
Closes an open position by ticket. 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 | — | — |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |
modify_position
Modifies the stop_loss and/or take_profit of an open position. At least one of stop_loss or take_profit 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 | — | — |
stop_loss | number | No | — | — |
take_profit | number | No | — | — |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |
place_order
Places a market or pending order on MT5. Defaults to dry_run=true — set dry_run=false to execute live. Pending orders may set expiry (unix epoch seconds) for broker-side expiration; expiry is rejected on market 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 |
|---|---|---|---|---|
symbol | string | Yes | — | — |
volume | number | Yes | — | — |
order_type | string | Yes | — | (one of: BUY, SELL, BUY_LIMIT, BUY_STOP, SELL_LIMIT, SELL_STOP) |
price | number | No | — | — |
stop_loss | number | No | — | — |
take_profit | number | No | — | — |
magic | integer | No | — | — |
comment | string | No | — | — |
expiry | integer | No | — | Pending orders only: expiration as unix epoch seconds (UTC). Must be in the future. |
dry_run | boolean | No | true | — |
terminal_id | string | No | — | — |