📈Trading with AI
The assistant can place, modify and close trades. This page explains exactly what it can do, what it cannot do, and how to keep it in check.
Trading tools act on live accounts with real money. An assistant can misread an instruction, a symbol name or a volume. Never enable trading on an account you are not prepared to see traded.
Enabling it
Trading is off unless four things are true at the same time:
The connection uses a read write credential. A
READ_ONLYAPI key can never trade.On OAuth, the scope
mcp:trading.writewas approved. Without it every trading endpoint is refused, even when configuration writes are allowed.The endpoint includes the
tradingtoolset and is not a/readonlyendpoint.The project has 100 accounts or fewer. See large projects are read only.
Example of a connection that may trade on one specific project:
https://ai.metacopier.io/p/{projectId}/mcp/x/tradingThe five trading tools
metacopier_open_position
Opens a position, or places a pending order, and waits for the broker to answer. The result tells you whether it worked.
metacopier_send_order
The same, but returns immediately without waiting. Faster, and it does not confirm that the trade was executed.
metacopier_modify_position
Changes the stop loss, take profit, volume or pending price of an existing position or order.
metacopier_close_position
Closes one position, or cancels one pending order.
metacopier_close_all_positions
Closes everything open on one account, and cancels its pending orders.
All five are marked destructive in the protocol, which is the signal most hosts use to ask you to confirm before the call goes out. Whether you actually get that confirmation dialog depends on your client, so treat it as a helpful extra and not as your safety net.
Parameters
Opening a position or sending an order
accountId
yes
The account to trade on
symbol
yes
The symbol as the broker spells it, for example EURUSD or ETHUSD
orderType
yes
Buy, Sell, BuyLimit, SellLimit, BuyStop or SellStop
volume
yes
Size in lots, for example 0.1
openPrice
no
Required for the four pending types. Left out on a market order, which fills at the current price.
stopLoss
no
Price, or points when relativeTpSl is set. Omit or 0 for none.
takeProfit
no
Same as above
relativeTpSl
no
When true, stop loss and take profit are read as a distance in points from the fill price instead of an absolute price
pendingExpirySeconds
no
How long a pending order stays alive. MT4 and MT5 only, and the broker decides whether it accepts it.
comment
no
A short note on the trade. Keep it under roughly 23 characters, the rest is cut off.
Modifying
accountId and positionId are required. Everything you pass of stopLoss, takeProfit, volume and openPrice is changed, everything you leave out stays as it is.
Closing
accountId and positionId are required. pendingOnly restricts the call to cancelling an unfilled order, so a filled position is left alone.
Things worth knowing before you let it trade
Copiers still apply
A trade the assistant opens on a master account, meaning an account whose trades are copied to its follower accounts, is copied exactly like any other trade. "Buy 0.1 lots of EURUSD" on a master is not one trade, it is one trade per follower, sized by each copier's settings.
Before you ask for a trade, ask the assistant what the account is: "Is this account a master, and which accounts follow it?" It has the tools to answer.
Send order does not confirm anything
metacopier_send_order returns as soon as the request is on its way. A rejection by the broker, an invalid volume or a closed market surfaces later in the account log, not in the answer you see. Prefer metacopier_open_position unless speed genuinely matters, and check the logs afterwards.
Close all is per account
metacopier_close_all_positions closes everything on one account. It does not close the whole project. If the account is a master, the closes are copied to its followers as usual.
Symbols are the broker's
Brokers name the same instrument differently: EURUSD, EURUSD.m, EURUSD_i. The assistant can list the symbols an account actually has, and it should, rather than guess. If a trade is refused with an unknown symbol, that is usually why.
Request ids
Every order carries a request id so that a repeated network attempt cannot become a second trade. This is handled for you, there is nothing to configure.
Recommended way to work
Start with a read only connection and get used to what the assistant sees and how it reasons.
Move to a connection that has
tradingbut only on a demo project or a demo account while you learn its habits.When you go live, keep trading on its own connection, for example
/p/{projectId}/mcp/x/trading, separate from the connection you use for everyday questions. A conversation about copier settings then has no way to place an order at all.Always name the account explicitly in your instruction, and read back what the assistant says it is about to do before you confirm.
A good habit: ask for a plan first. "Do not trade yet. Tell me exactly which order you would send, on which account, and with what stop." Then confirm.
Last updated