Errors and Limits

Error format

Every error response has the same JSON body. id repeats the HTTP status, error names the error and message explains it. requestId matches the X-Request-Id response header: include it when you report a problem.

{
  "id": 404,
  "error": "NotFoundError",
  "message": "Account not found",
  "requestId": "4f7c2a9e-1b3d-4c8e-9a6f-2d5b8e1c0a47"
}

Some errors add details (which field failed, or the id of an existing account) or metadata (for example when a blocked login lifts, or the code of a trading error).

You can send your own X-Request-Id header (8 to 64 letters, digits, dashes or underscores). The API echoes it back, so your logs and ours share one id.

HTTP errors

StatusErrorWhen it happensWhat to doRetryable
400ValidationErrorA field is missing, has the wrong type, or a date is not ISO 8601. details lists each problem. The path or query string contains a null byte (%00). Trading calls also return it without a valid Idempotency-Key (E_IDEMPOTENCY_KEY_MISSING) or for a volume outside the symbol's limits (E_INVALID_VOLUME).Fix the request using details and metadata.No
400CredentialsBlockedErrorThe broker rejected this exact login, password and server a short time ago. metadata.blockedUntil says when you can try again.Check the login, investor password and server name. Retrying the same details before blockedUntil is refused.After blockedUntil, with corrected details
401UnauthorizedErrorThe API key is missing, wrong, revoked or expired. An expired key gets the message This API key expired on 4 Mar 2026. Create a new key in the API portal. The date is in UTC.Send Authorization: Bearer fo_live_... with an active key from the API keys page.No
402PaymentRequiredErrorDeploying this account needs more credit than your balance holds. Creating an account is also refused while 20 accounts wait for payment (metadata.waitingAccounts, metadata.limit).Add funds on the Billing page, then deploy again.After adding funds
403ForbiddenErrorThe API key is read-only and the request is not a GET, or the key is limited to chosen accounts and the endpoint covers your whole developer account (creating accounts, billing). On trading calls: the account cannot trade (E_ACCOUNT_CANNOT_TRADE), or its platform and margin mode cannot trade (E_TRADING_NOT_SUPPORTED).Use a key with the access you need. Keys are set when you create them on the API keys page. For E_ACCOUNT_CANNOT_TRADE, connect the account with its master password.No
404NotFoundErrorThe account does not exist, belongs to another developer, or your API key is limited to other accounts. On prices: the broker has no symbol with that name (Symbol not found), or no quote for it yet (No quote).Check the account id. List the accounts your key can see with GET /v1/accounts.No
409ConflictErrorThe account already exists (details.existingAccountId has its id), is being deleted, or cannot make that change from its current state.Use the existing account, or read the account and act on its state.No
413PayloadTooLargeErrorThe body of a POST, PUT or PATCH request, MCP requests included, is larger than 1 MiB (1,048,576 bytes).Send a smaller body.No
422TradeRejectedErrorThe broker rejected a trade. metadata has code, brokerCode, retryable and tradeRequestId.See trading errors.When retryable is true, with a new Idempotency-Key
422IdempotencyKeyReusedErrorThe Idempotency-Key was already used for a different trading request.Use a new key for a new request.No
429TooManyRequestsErrorToo many requests per second, 3 accounts are already deploying, or 50 trade requests are already waiting for the account (E_QUEUE_FULL).Wait for the number of seconds in the Retry-After header. The deploy limit and the full trade queue send no Retry-After: wait for a deploy to finish, or for this account's trade requests to finish.Yes
500InternalErrorSomething failed on our side.Retry with a short backoff. If it keeps failing, report the requestId.Yes
502InternalErrorThe payment provider failed while creating a checkout.Retry the checkout.Yes
503ServiceUnavailableErrorA deploy could not be queued. On trading calls: the account is not connected or has not reported yet whether it can trade (E_ACCOUNT_NOT_CONNECTED), or the trade request expired before it was sent (E_REQUEST_EXPIRED). On prices: the account is not deployed and connected (E_ACCOUNT_NOT_CONNECTED), or it cannot read prices right now or did not answer within about 10 seconds (E_PRICES_UNAVAILABLE).Retry with a short backoff. A trade that expired was never sent: send it again with a new Idempotency-Key.Yes

Account connection errors

Connecting to the broker happens after POST /v1/accounts returns. If it fails, the account's error field explains why, and retryable tells you whether deploying again can help.

{
  "code": "E_AUTH",
  "message": "Invalid account",
  "retryable": false
}
CodeMeaningWhat to doRetryable
E_AUTHThe broker rejected the login. message is the broker's own reason.Delete the account and create it again with the correct login, password and server.No
E_SRV_NOT_FOUNDThe broker server name was not found. suggestions lists the closest known names, and is empty for a name longer than 100 characters.Delete the account and create it again with the right name. Find it with GET /v1/servers?query=... or in the MetaTrader login window.No
E_BROKER_UNREACHABLEThe broker server did not answer.Deploy again later.Yes
E_TIMEOUTThe broker took too long to log in.Deploy again.Yes
E_NO_CAPACITYNo connection slot was free.Deploy again later.Yes
E_INSUFFICIENT_CREDITYour credit does not cover the deploy.Add funds on the Billing page, then deploy again.No
E_PROVISIONING_PAUSEDNew deployments are paused for a short time.Deploy again later.Yes
E_INTERNALSomething failed on our side.Deploy again. If retryable is false, wait before retrying.Usually

Trading errors

Trading calls add a stable code to metadata. The calls below are refused before anything is stored. Fix the cause, then send the request again: with the same Idempotency-Key, except after E_IDEMPOTENCY_KEY_REUSED, which needs a new key.

StatusCodeMeaning
400E_IDEMPOTENCY_KEY_MISSINGThe Idempotency-Key header is missing or invalid.
400E_INVALID_VOLUMEThe volume is outside the symbol's range or off its lot step. metadata has volumeMin, volumeMax and volumeStep.
400E_TRADE_DISABLEDThe broker does not allow this trade on the symbol.
400E_CLOSE_ONLYThe symbol only allows closing positions.
400E_INVALID_CLOSE_BYClose Position By: the two tickets are the same, are on different symbols or are in the same direction. details names oppositeTicket.
403E_ACCOUNT_CANNOT_TRADEThe account is connected with its investor password, or the broker has disabled trading.
403E_TRADING_NOT_SUPPORTEDTrading is not available for the account's platform and margin mode.
422E_IDEMPOTENCY_KEY_REUSEDThe key was used for a different request.
429E_QUEUE_FULL50 trade requests are already waiting for the account.
503E_ACCOUNT_NOT_CONNECTEDThe account is not deployed and connected, or its connection has not reported yet whether it can trade. Also returned by Get Quote, Get Quotes, List Candles, the calculations and Check Order.
503E_PRICES_UNAVAILABLEGet Quote, Get Quotes, List Candles, the calculations or Check Order: the account cannot answer right now or did not answer within about 10 seconds; retry shortly. For one symbol of Get Quotes this is that symbol's entry in errors, not a failed call.

The codes below are outcomes of a stored trade request, returned as 422 TradeRejectedError (or 503 for E_REQUEST_EXPIRED) and kept in the trade request's error.code. brokerCode is the broker's own code: an MT5 return code or an MT4 error number, negative for FundedOps codes. Send a retryable trade again with a new Idempotency-Key.

CodeMeaningRetryable
E_REQUOTEThe price changed before the broker could fill the request.Yes
E_REJECTEDThe broker rejected the request.No
E_BROKER_TIMEOUTThe broker did not answer in time. Check the order state before retrying.Yes
E_INVALID_REQUESTThe broker did not accept the request parameters.No
E_INVALID_VOLUMEThe volume is not valid for this symbol.No
E_INVALID_PRICEThe price is not valid.No
E_INVALID_STOPSThe stop loss or take profit is too close to the market price, or invalid.No
E_INVALID_EXPIRATIONThe expiration could not be used.No
E_INVALID_FILLThe broker does not support this filling mode for the symbol.No
E_INVALID_CLOSE_VOLUMEThe close volume is larger than the position volume. Nothing was sent.No
E_INVALID_CLOSE_BYClose Position By: the two positions are not open on the same symbol in opposite directions.No
E_TRADE_DISABLEDTrading is disabled for this symbol or account, also when the broker's server disables automated trading.No
E_CLOSE_ONLYThe broker only allows closing positions for this symbol.No
E_MARKET_CLOSEDThe market is closed.No
E_NO_MONEYThere is not enough free margin for this request.No
E_NO_QUOTESThe broker has no prices for this symbol right now.Yes
E_ORDER_LOCKEDThe order or position is being processed.Yes
E_FROZENThe order or position is frozen because it is too close to the market price.Yes
E_TOO_MANY_REQUESTSToo many requests were sent to the broker.Yes
E_TOO_MANY_ORDERSThe account reached the broker's limit for orders or positions.No
E_AUTOTRADING_DISABLEDAutomated trading is disabled for this account.Yes
E_NO_CONNECTIONThe account has no connection to the broker. Returned for changes and cancels only: an open or a close ends unknown instead.Yes
E_BUSYThe trade context is busy.Yes
E_FIFOThe broker requires positions to be closed in FIFO order.No
E_POSITION_NOT_FOUNDThe position does not exist. It may already be closed.No
E_ORDER_NOT_FOUNDThe order does not exist. It may already be filled or cancelled.No
E_SOME_POSITIONS_NOT_CLOSEDClose Positions: some positions were not closed. result.positions has the details.No
E_NOT_SENTThe request was not sent and nothing changed on the account.Yes
E_REQUEST_EXPIREDThe request expired before it was sent to the broker. Nothing happened: send it again with a new key. Always a 503.Yes
E_ACCOUNT_CANNOT_TRADETrading is not allowed on this account.No
E_TRADING_NOT_SUPPORTEDThis connection does not support trading.No
E_BROKER_ERRORAny other broker code. brokerCode has it.No

Broker codes map to these codes by meaning. For example, MT4 errors 4051 and 4106 (unknown symbol) are E_INVALID_REQUEST, 4107 is E_INVALID_PRICE, and 4110 and 4111 (buys or sells not allowed) are E_TRADE_DISABLED. MT5 code 10026 and MT4 error 4112 (the broker's server disabled automated trading) are also E_TRADE_DISABLED and not retryable, while MT5 code 10027 is E_AUTOTRADING_DISABLED.

A trade request can also end unknown: it reached the broker but no outcome came back, or the connection to the broker dropped while an open or a close was sent. Check the account's positions and orders before you send it again, as the Trading guide explains.

Rate limits

LimitValueWhen you exceed it
Requests per second, per developer account25, with bursts up to 100429 TooManyRequestsError with a Retry-After header
Accounts deploying at the same time3429 TooManyRequestsError until one finishes
Trade requests waiting per account50429 TooManyRequestsError with E_QUEUE_FULL until some finish
Active API keys5Revoke a key before creating another
Results per page on list endpoints100 by default, up to 1,000 with limitRead the next page from X-Next-Offset
WebSocket connections per developer account5, shared by all your keysThe new connection closes with code 4429
Accounts per WebSocket connection50The extra subscribe gets an error frame; the connection stays open
Price subscriptions per WebSocket connection50, quote symbols and candle streams togetherThe subscribe gets a 429 error frame; nothing new is subscribed
Bars per List Candles call100 by default, up to 1,000 with limit400 ValidationError
Symbols per Get Quotes call50400 ValidationError
Request body of a POST, PUT or PATCH1 MiB (1,048,576 bytes)413 PayloadTooLargeError

Every response to a request with a valid key carries the current budget:

HeaderMeaning
X-RateLimit-LimitThe most requests you can send in a burst (100).
X-RateLimit-RemainingWhole requests left after this one.
X-RateLimit-ResetSeconds until the budget is full again (0 when it is full).

List endpoints that take offset and limit (GET /v1/accounts, history-deals, history-orders, history-positions) add X-Total-Count, the number of matching rows, and X-Next-Offset when there is another page. Send that value as offset to read it. offset can be at most 1,000,000,000.

All your API keys share the same limits. See WebSockets for close codes and keepalive rules.

Check System Status when requests fail unexpectedly.

Retrying safely

Retry only when the table says so, and wait longer each time: for example 1, 2, 4 and 8 seconds. A trading call you are unsure about is safe to send again with the same Idempotency-Key: it returns the first outcome instead of trading twice. That includes a 502 or 504 from a proxy on the way, whose body is not the error format above: the trade may have been stored or sent, so send it again with the same key, never a new one. On a 429, always wait at least the Retry-After seconds. Repeating deploy, undeploy or DELETE on an account that is already in that state returns the account unchanged, and creating an account that already exists returns 409 with its id instead of a second copy.