Move stop loss / take profit
modify_positionMoves a position's stop loss or take profit on the user's real broker account (or demo); null removes a level. Remove a stop loss only when the user asks. Example: {"account_id": "", "position_id": "", "stop_loss": "1.08000", "idempotency_key": ""}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account_id": "<account_id>",
"position_id": "<position_id>",
"idempotency_key": "<idempotency_key>"
},
"name": "modify_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop_loss | No | ||
| account_id | Yes | The fxapis account id (a UUID) from list_accounts — not the MT5 login number. | |
| position_id | Yes | The position ticket: `brokerPositionId` from list_positions. | |
| take_profit | No | ||
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes |