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 URLhttps://api.api2trade.com/, the same for every accounthttps://api.api2trade.com/v2/{account_id}/, one per account
Account identified by?id= query parameterthe path
API keyx-api-key headerX-API-Key header — the same key
Placing, modifying, closing ordersGET with query parametersPOST with a JSON body
Live datapollingWebSocket
Connecting accountsRegisterAccount, GetAccounts, DeleteAccountAccount API at /v2/accounts
Time to connectsecondsa few minutes
MT4 and MT5different endpointsthe same endpoints

Moving an account

  1. Check the calls you use against the table below. A few Legacy calls have no v2 equivalent.
  2. Remove the account from the Legacy API — in the dashboard under Accounts, or with DeleteAccount. Its slot is free again immediately.
  3. Add it on API v2 — in the dashboard with Add Account → API v2, or with POST /v2/accounts as in the Quickstart. It takes the same slot.
  4. Wait for ready. The account shows as provisioning for a few minutes while it logs in to your broker. If the broker rejects the login, terminalLastError says why.
  5. 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 v2Notes
AccountSummaryAccountSummary
AccountDetails, AccountAccountInfo
CheckConnect, PingstatusAlways 200 — read broker.connected and account.loggedIn
GetQuote, QuotegetQuote
GetQuoteMany, MarketWatchManyWebSocket topic pricesOr one getQuote per symbol
Symbols, SymbolListsymbolsNames only
SymbolParams, SymbolParamsManySymbolInfosymbols=EURUSD,GBPUSD for up to 100 in one call
SymbolSessionsSymbolInfoIn sessions
TickValueWithSize, GetTickValueManySymbolInfo, OrderCalcProfittickValue is in SymbolInfo
RequiredMarginOrderCalcMargin
OpenedOrders, OpenedOrder, OpenedOrdersTicketsOpenedOrdersOne list of positions and pending orders
—PendingOrdersNew: the pending orders alone, with expiry and initial volume
OrderSendOrderSendA 200 only means MetaTrader answered — check success and retcode
OrderModifyOrderModify
OrderCloseOrderClosevolume instead of lots; also deletes pending orders
OrderDeleteOrderCloseWith the pending order's ticket
—CloseAllNew: closes every position in one call
—SymbolSelectNew: prepares up to 100 symbols for trading in one call
OrderHistory, ClosedOrders, OrderHistoryPaginationOrderHistoryDeals in a from–to range, not paged; stopLoss/takeProfit are sl/tp — see stop-loss in the history
HistoryPositions, HistoryPositionsByCloseTimePositionHistoryClosed round trips in a from–to range, sl/tp as at close
HistoryDealsByPositionIdOrderHistoryFilter on position
PriceHistory and its …Ex, …Today, …Month, …HighLow, …Many variantsPriceHistoryOne symbol per call, from–to range, timeframe
QuoteHistory, QuoteHistoryMany, RequestQuoteHistoryPriceHistoryfrom–to instead of from + count
ServerTimezoneServerTimezone
RegisterAccount, GetAccounts, DeleteAccountAccount APIPOST, GET and DELETE on /v2/accounts

Not available on API v2

  • Trade statistics: TradeStats, TradeStatsEquityHistory, EquityHistory
  • Broker mail: Mails
  • Session checks: IsTradeSession, IsQuoteSession and their …Many variants — the session windows themselves are in SymbolInfo
  • Pending order history: PendingOrderHistory — OrderHistory only lists orders that were filled. Active pending orders are in PendingOrders, and the WebSocket topic orders reports 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.