Migrating to API v2
The Legacy API is switched off on 31 December 2026. What changes, and how to move an account.
API v2 replaces the Legacy API, documented here as API v1. The Legacy API will be switched off on 31 December 2026. Until then, accounts on it keep running unchanged, but each one has to be on API v2 by that date.
Connect new accounts on v2
An account you add on the Legacy API today has to be moved again before 31 December. Choose API v2 when you add it.
What changes
| Legacy API (v1) | API v2 | |
|---|---|---|
| Base URL | https://api.api2trade.com/, the same for every account | https://api.api2trade.com/v2/{account_id}/, one per account |
| Account identified by | ?id= query parameter | the path |
| API key | x-api-key header | X-API-Key header — the same key |
| Placing, modifying, closing orders | GET with query parameters | POST with a JSON body |
| Live data | polling | WebSocket |
| Connecting accounts | RegisterAccount, GetAccounts, DeleteAccount | Account API at /v2/accounts |
| Time to connect | seconds | a few minutes |
| MT4 and MT5 | different endpoints | the same endpoints |
Moving an account
- Check the calls you use against the table below. A few Legacy calls have no v2 equivalent.
- Remove the account from the Legacy API — in the dashboard under
Accounts, or with
DeleteAccount. Its slot is free again immediately. - Add it on API v2 — in the dashboard with Add Account → API v2, or with
POST /v2/accountsas in the Quickstart. It takes the same slot. - Wait for
ready. The account shows asprovisioningfor a few minutes while it logs in to your broker. If the broker rejects the login,terminalLastErrorsays why. - Point your code at the new base URL. The account has a new ID, so its URL is new as well.
Plan for a short gap
Between removing the account and v2 reporting ready, the account answers on
neither API. Move it at a time when your software can pause for a few minutes.
Endpoint by endpoint
API v2's Trading API has the same endpoints on MT4 and MT5, so one table covers both; some
of the Legacy names existed on only one platform. Order calls move from GET
with query parameters to POST with a JSON body, and their fields are
camelCase — stopLoss, takeProfit, volume.
| Legacy API (v1) | API v2 | Notes |
|---|---|---|
AccountSummary | AccountSummary | |
AccountDetails, Account | AccountInfo | |
CheckConnect, Ping | status | Always 200 — read broker.connected and account.loggedIn |
GetQuote, Quote | getQuote | |
GetQuoteMany, MarketWatchMany | WebSocket topic prices | Or one getQuote per symbol |
Symbols, SymbolList | symbols | Names only |
SymbolParams, SymbolParamsMany | SymbolInfo | symbols=EURUSD,GBPUSD for up to 100 in one call |
SymbolSessions | SymbolInfo | In sessions |
TickValueWithSize, GetTickValueMany | SymbolInfo, OrderCalcProfit | tickValue is in SymbolInfo |
RequiredMargin | OrderCalcMargin | |
OpenedOrders, OpenedOrder, OpenedOrdersTickets | OpenedOrders | One list of positions and pending orders |
| — | PendingOrders | New: the pending orders alone, with expiry and initial volume |
OrderSend | OrderSend | A 200 only means MetaTrader answered — check success and retcode |
OrderModify | OrderModify | |
OrderClose | OrderClose | volume instead of lots; also deletes pending orders |
OrderDelete | OrderClose | With the pending order's ticket |
| — | CloseAll | New: closes every position in one call |
| — | SymbolSelect | New: prepares up to 100 symbols for trading in one call |
OrderHistory, ClosedOrders, OrderHistoryPagination | OrderHistory | Deals in a from–to range, not paged; stopLoss/takeProfit are sl/tp — see stop-loss in the history |
HistoryPositions, HistoryPositionsByCloseTime | PositionHistory | Closed round trips in a from–to range, sl/tp as at close |
HistoryDealsByPositionId | OrderHistory | Filter on position |
PriceHistory and its …Ex, …Today, …Month, …HighLow, …Many variants | PriceHistory | One symbol per call, from–to range, timeframe |
QuoteHistory, QuoteHistoryMany, RequestQuoteHistory | PriceHistory | from–to instead of from + count |
ServerTimezone | ServerTimezone | |
RegisterAccount, GetAccounts, DeleteAccount | Account API | POST, GET and DELETE on /v2/accounts |
Not available on API v2
- Trade statistics:
TradeStats,TradeStatsEquityHistory,EquityHistory - Broker mail:
Mails - Session checks:
IsTradeSession,IsQuoteSessionand their…Manyvariants — the session windows themselves are inSymbolInfo - Pending order history:
PendingOrderHistory—OrderHistoryonly lists orders that were filled. Active pending orders are inPendingOrders, and the WebSocket topicordersreports each one being placed, changed, deleted, expired or filled - MT4 extras:
OrderCloseBy,Groups,IsInvestor,TradeRightsMany - Broker server lookup:
Search,LoadServersDat,LoadServersIni,LoadSrv,PingHost,PingHostMany— v2 takes the server name exactly as your broker writes it
If your integration depends on one of these, contact us before you move it.