Docs

Migrating from MetaApi to fxapis

A concept-by-concept guide for moving an MT5 integration from MetaApi to fxapis: provisioning and deploy versus connect and modes, RPC and streaming versus REST and polling, a table of equivalent calls, and what has no equivalent yet — streaming, MT4 and CopyFactory features.

This guide is for teams with an MT5 integration on MetaApi who are evaluating or planning a move to fxapis. It maps MetaApi's concepts to ours, lists equivalent calls, and is explicit about what fxapis does not have yet, so you can decide with the full picture.

The MetaApi details below come from its public documentation, read on 30 September 2026; see Sources. MetaApi changes over time — check its current docs for anything your decision depends on.

The short version

MetaApifxapis
PlatformsMetaTrader 4 and 5MetaTrader 5 only
InterfacesREST, WebSocket streaming, SDKs (Node.js, Python, Java)REST (plain HTTPS, any language)
Account lifecycleCreate, then deploy / undeployConnect, then a mode decides when it is online
Real-time updatesStreaming connection with synchronization listenersPolling — no streaming or webhooks yet
Trade copyingCopyFactory productMulti-account orders + your own copier
Order identityclientId on a tradeclientOrderId, plus an Idempotency-Key header: a retry returns the first answer
An order whose answer was lostSee MetaApi's docsReported as ORDER_UNRESOLVED, then confirmed against the broker's records
Market dataQuotes, candles, ticksNot provided

If your product depends on streaming updates, MT4, market data or CopyFactory's risk features, fxapis does not replace them today. If it places orders on MT5 accounts — one at a time or across many — and needs a recorded result for every order, with an unclear one confirmed with the broker rather than guessed, read on.

Concepts

Provisioning and deploy → connect and modes

In MetaApi you create an account through the provisioning API (POST /users/current/accounts with name, server, login, password, platform, magic and options such as type, region and reliability), then deploy it (POST …/deploy), which starts an API server and a trading terminal for it, and undeploy it to stop them.

In fxapis you connect an account with POST /v1/accounts — login, server, password, and a mode. The mode replaces manual deploy/undeploy:

fxapis modeBehaves like
always_onAn account that is always deployed.
warm_on_demandDeployed automatically when you place an order or prepare it; undeployed automatically after 15 idle minutes.
coldDeploy and undeploy yourself, with warm and cool.

Coming online takes about ten seconds in our tests. MetaApi's waitConnected() and waitSynchronized() correspond to polling GET /v1/accounts/{id}/status until state is ready. POST /v1/accounts/prepare brings up to 200 accounts online in one call.

There is no magic field: fxapis tags each order's MT5 comment so it can match the broker's record to your order, and gives you clientOrderId for your own reference.

RPC and streaming connections → REST and polling

MetaApi offers an RPC connection (account.getRPCConnection()), which its docs recommend for monitoring apps and simple trading apps, and a streaming connection (account.getStreamingConnection()), recommended for trade copiers and automated strategies, which keeps a synchronized local terminal state and calls your listeners on every change.

fxapis has one interface: REST. What you would read from a streaming connection's terminal state you read with requests:

There are no event webhooks yet. Code that reacts to onPositionUpdated or onDealAdded becomes a polling loop; the copier guide shows one.

Trades

MetaApi places trades through one endpoint, POST …/trade, with an actionType. fxapis has one endpoint per intent, and every order that opens or closes exposure takes an Idempotency-Key:

  • A retry with the same key returns the first answer instead of placing a second order, for 24 hours.
  • Three failures are distinguished: SEND_FAILED (never reached the broker — safe to retry), ORDER_REJECTED (the broker refused, with its retcode), and ORDER_UNRESOLVED (the answer was lost — do not resend; the order is confirmed against the broker's records and moves to what actually happened).
  • Volumes and prices are strings: "0.01", never 0.01.

See Idempotent MT5 orders and Trading.

CopyFactory → multi-account orders and a copier

CopyFactory is a complete copy-trading product: strategies and subscribers, per-subscription copy ratios, symbol mapping, risk filters (drawdown, equity curve, leverage), stop-outs and signal filtering, with very low internal copying latency per its docs.

fxapis provides the execution building block — multi-account orders, one trade sent to up to 500 accounts together on Enterprise (accounts per multi-account order: Starter 10, Scale 100, Enterprise 500), with per-account volumes, barrier policies and a dispatch spread of about 30 ms across 100 accounts in our benchmark against an instant broker — every multi-account order reports its own — and you build the copying logic. The trade copier guide is a working starting point. Risk filters, stop-outs, symbol mapping and subscriber management are yours to implement.

Equivalent calls

MetaApifxapis
POST /users/current/accounts (provisioning)POST /v1/accounts
POST …/accounts/:id/deployPOST /v1/accounts/{id}/warm, or a mode that does it for you
POST …/accounts/:id/undeployPOST /v1/accounts/{id}/cool
Removing an accountPOST /v1/accounts/{id}/disconnect — erases the password, keeps the history
waitConnected() / waitSynchronized(), connectionStatusPoll GET /v1/accounts/{id}/status until ready
POST …/trade with ORDER_TYPE_BUY / ORDER_TYPE_SELLPOST /v1/accounts/{id}/orders/market with side
ORDER_TYPE_BUY_LIMIT, …_STOP, …_STOP_LIMIT (and sells)POST /v1/accounts/{id}/orders/pending with kind
POSITION_MODIFYPOST /v1/accounts/{id}/positions/{ticket}/modify
POSITION_CLOSE_IDPOST /v1/accounts/{id}/positions/{ticket}/close
POSITION_PARTIALThe same close, with volume
ORDER_MODIFYPOST /v1/orders/{id}/modify
ORDER_CANCELPOST /v1/orders/{id}/cancel
POSITIONS_CLOSE_SYMBOL, POSITION_CLOSE_BYNo single call — close each position
GET …/accounts/:id/positionsGET /v1/accounts/{id}/positions
GET …/history-deals/time/:start/:endGET /v1/accounts/{id}/deals?since=…&until=…
History ordersGET /v1/orders?accountId=…
Margin calculationPOST /v1/accounts/{id}/calculate
clientId on a tradeclientOrderId, plus an Idempotency-Key header
CopyFactory strategies and subscriptionsPOST /v1/execution-waves + your copier

No equivalent yet

Be sure none of these is load-bearing for you:

  • Streaming. No WebSocket connection, synchronization listeners or webhooks. Poll.
  • MetaTrader 4. fxapis connects MT5 accounts only.
  • CopyFactory features. No strategy/subscriber model, risk filters, stop-outs or symbol mapping.
  • Market data. No quotes, ticks or candles.
  • Demo account creation. fxapis does not open accounts at brokers; you connect existing ones.
  • Account balance and equity fields. Derive them from deals and positions (see prop-firm monitoring).
  • Official SDKs. Any HTTP client works; the language guides have complete programs for seven languages.

A migration plan

Try it on a demo account

Create an fxapis key and run the Quickstart or a language guide against a broker demo account. fx_test_ keys still reach real brokers — they are a label, not a sandbox.

Map your lifecycle

Decide each account's mode. Accounts you kept deployed all the time become always_on; accounts you deployed around trades become warm_on_demand, and the deploy/undeploy code goes away.

Collect credentials again

Connecting an account to fxapis needs its login, trading password and server name, sent to POST /v1/accounts from your backend. Plan how each user re-enters their password, and check it straight away — see Connect MT5 accounts.

Port order placement

Replace each actionType with its endpoint from the table above. Add an Idempotency-Key to every market order, pending order and close, derived from your own decision (for example signal + account), and handle ORDER_UNRESOLVED by polling, never resending.

Replace listeners with polling

Turn streaming listeners into loops over positions and deals, with the interval your product needs. Show users observedAt so they know how fresh a view is.

Switch accounts over one at a time

Avoid having both platforms placing orders on the same account at the same time: each would treat the other's trades as unexplained. Move an account, confirm its orders and history in fxapis, then remove it from the old setup.

Sources

MetaApi documentation, read on 30 September 2026:

fxapis facts on this page are from our own API reference and measurements.

On this page