Amend an order: broker API endpoints compared
15 documented calls from 9 of the 12 APIs with endpoint records here, and 5 functions and messages from 3 APIs whose interfaces are not HTTP, each with the page it was read on.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
What this task is
Amending changes something that already exists: the level, size or expiry of an order that has not filled, or the stop and limit attached to an open position.
APIs differ on whether an amendment carries only the fields that change or the whole ticket again. Sending a partial body to an API that expects the whole ticket can clear the fields you left out, so read the record before you rely on it.
The documented endpoint, API by API
Ordered by the name of the broker or platform API, then by path. The order is not a ranking. Open a row for the parameters, the response and a sample request.
| Broker or platform | Endpoint | What the record says it does | Source |
|---|---|---|---|
| Capital.com | PUT/api/v1/positions/{dealId} | Amend an open position: move or add its stop loss and take profit, or switch to a guaranteed or trailing stop. Confirm with GET /api/v1/confirms/{dealReference}. | open-api.capital.comchecked |
| Capital.com | PUT/api/v1/workingorders/{dealId} | Amend a LIMIT or STOP working order: its price level, cancellation date, stop loss or take profit. | open-api.capital.comchecked |
| DXtrade APIs | PUT/accounts/{accountCode}/orders | Change an order that is not yet final by sending the whole order request again with the changed fields. | demo.dx.tradechecked |
| eToro | PATCH/api/v2/trading/demo/positions/{positionId} | Sends an asynchronous request to change or clear the stop loss or take profit on an open demo position. | api-portal.etoro.comchecked |
| eToro | PATCH/api/v2/trading/positions/{positionId} | Changes or clears the stop loss and take profit on an open real account position. The request is queued: a 202 reply means it was accepted, not applied. | api-portal.etoro.comchecked |
| IG | PUT/positions/otc/{dealId} | Amend the stop, limit or trailing stop on an open position. | labs.ig.comchecked |
| Interactive Brokers | POST/iserver/account/{accountId}/order/{orderId} | Changes an existing order that has not filled. Send the whole ticket with the new values. | interactivebrokers.comchecked |
| Match-Trader Platform API | POST/mtr-api/{SYSTEM_UUID}/pending-order/edit | Change a pending order: its price, volume, stop loss or take profit. | app.theneo.iochecked |
| Match-Trader Platform API | POST/mtr-api/{SYSTEM_UUID}/position/edit | Change the stop loss and take profit of an open position. | app.theneo.iochecked |
| OANDA | PUT/v3/accounts/{accountID}/orders/{orderSpecifier} | Replace a pending order: the old order is cancelled and a new one created from the specification you send, in a single call. Returns 201. | developer.oanda.comchecked |
| OANDA | PUT/v3/accounts/{accountID}/trades/{tradeSpecifier}/orders | Create, replace or cancel the orders that hang off a trade: take profit, stop loss, trailing stop loss and guaranteed stop loss. This is how a stop or limit is moved on an open trade. | developer.oanda.comchecked |
| Saxo OpenAPI | PATCH/trade/v1/positions/{PositionId} | Change a property of an existing position. The documented use is clearing its force open flag so that it can net against an opposite position. | developer.saxochecked |
| Saxo OpenAPI | PATCH/trade/v2/orders | Changes one or more existing open orders, for example the price, size or duration. The order is identified by OrderId in the body, not in the path. | developer.saxochecked |
| TradeLocker API | PATCH/trade/orders/{orderId} | Change a pending order: its price, size, validity, stop loss or take profit. | public-api.tradelocker.comchecked |
| TradeLocker API | PATCH/trade/positions/{positionId} | Change the stop loss, the take profit or both on an open position. Sending null for one removes it. | public-api.tradelocker.comchecked |
The same task where the interface is not HTTP
Some platform APIs, and the streaming interfaces of some broker APIs, are not sent as HTTP requests. A function is called from a program in its language, and a message is sent over an open connection. None has a method or a path, so each row is labelled with its kind and its interface. A record is put on this page by hand, from what the vendor's page says the call does, and one call can do several jobs, so the same function can be on more than one task page. Ordered by the name of the broker or platform API, then interface, then name.
| API | Call | What the record says it does | Source |
|---|---|---|---|
| cTrader Open API | messageProtoOAAmendOrderReq cTrader Open API | Changes a pending order: its size, its prices, its expiry or its stop loss and take profit. The definition allows it only where the access token has trade permission for the account. | help.ctrader.comchecked |
| cTrader Open API | messageProtoOAAmendPositionSLTPReq cTrader Open API | Changes the stop loss and take profit of an open position. The definition allows it only where the access token has trade permission for the account. | help.ctrader.comchecked |
| MetaTrader 4 (MQL4) | functionOrderModify() MQL4 | Changes an open or pending order: its stop loss and take profit, and for a pending order its price and expiry too. | docs.mql4.comchecked |
| MetaTrader 5 (Python package and MQL5) | functionorder_send() MetaTrader5 Python package | Sends a trade request from the terminal to the trade server. One call covers a market order, a pending order, a change to an order or position, a cancellation and a close: the request's action field says which. | mql5.comchecked |
| MetaTrader 5 (Python package and MQL5) | functionOrderSend() MQL5 | Sends a trade request to the trade server and waits for its answer. One function covers a market order, a pending order, a change, a cancellation and a close: the action field of the request says which. | mql5.comchecked |
None documented here yet
These APIs have endpoint records on this site, but none is assigned to this task. That describes this dataset. It is not a statement that the API lacks such a call.
- Deriv: none documented here yet
- Trading 212: none documented here yet
- MetaApi: none documented here yet
Brokers and platforms with no endpoint records at all are not listed above. The broker directory shows what is recorded for each.