Skip to main content

Troubleshooting Your API Requests


When working with the Exness API, errors generally happen on two levels:

  • HTTP status code: This tells you if your request successfully communicated with our servers.

  • API error code: This gives you the specific business, platform, or account reason why an action couldn't be completed.Shows the business or platform reason of the error.

For background trading operations, your initial request might be accepted by our servers, but the final trade could still be rejected moments later during processing. Always check the final status of your operation.

REST error response:

{
"code": 3001,
"error_message": "REQUEST_INVALID_PARAMETERS"
}

WebSocket error response:

{
"id": "request-1",
"code": 3000,
"error_message": "REQUEST_INVALID"
}

For asynchronous trading operations, the REST request may return 202 Accepted, but the final result can still be rejected later in transaction_event or in operation status.

Example:

{
"event_type": "transaction_event",
"operation_id": "789",
"status": "rejected",
"error_code": 5006,
"error_message": "TRADING_RULE_INSUFFICIENT_MARGIN",
"event_time": "2026-12-14T11:46:30+00:00",
"payload": {}
}

HTTP Status Guide

Use this quick reference to understand basic connection errors and how to fix them.

HTTP statusWhat It MeansHow to Fix It
400Invalid request or the details failed our validation checks.Fix the path, method, query, or JSON body, then retry.
401Authentication failedRebuild auth headers and signature for the exact request.
403Permission denied.Check account access, API key permissions, and operation scope.
404Entity not foundVerify the ID and confirm the API key can access the resource.
409State conflict or market/execution conflictRefresh state or prices, then retry only if the action is still valid.
422Business validation failedFix the business input, such as volume, margin, or price levels.
429Rate limit exceeded.Apply the returned limits, wait for capacity, then retry.
503Temporary unavailabilityRetry with backoff; reconnect WebSocket clients if needed.
500Internal server error on our end.Retry later with backoff; contact Support if it repeats.

Trading Error Codes

If your request reaches us but cannot be processed, you will receive a specific API error code.

CodeNameHTTP statusMeaning / likely reasonClient action
1SYSTEM_RATE_LIMIT429Too many requests for platform.Slow down request rate. Retry only when safe, using backoff and idempotency for repeated trading requests.
2SYSTEM_TEMPORARY_UNAVAILABLE503Temporary dependency issue from any service (auth,access point).Retry with exponential backoff. Keep the same idempotency key only when retrying the same mutating request.
3SYSTEM_INTERNAL_ERROR500Unexpected internal error from any service (auth, access point).Retry with backoff. Contact Support if the error is repeated or blocks normal operation.
1000AUTH_INVALID_API_KEY401Invalid token, audience.Check EXN-API-KEY, the api_key value inside EXN-DATA, account access, and whether the key is still active.
1001AUTH_INVALID_SIGNATURE401Invalid signature, certificate.Rebuild the signature payload. Check method, signed path, body hash, timestamp, key format, and base64url encoding.
1002AUTH_PERMISSION_DENIED403Valid credentials, but operation is not allowed.Check that the API key is allowed to access the account, source IP, and operation scope.
1003AUTH_RATE_LIMIT429Too many authentication requests.Stop immediate retries. Wait for retry_after when provided; otherwise retry with backoff.
2000ACCOUNT_NOT_FOUND404Account not found or unavailable from any service (auth, access point, platform).Check account_id and make sure the API key is allowed to access this account.
2001ACCOUNT_DISABLED403Account is disabled.Do not send new trading requests. Check the account status or contact Support.
2002ACCOUNT_CLOSE_ONLY403Account is close-only.Do not open new exposure. Only close positions or cancel orders where allowed.
3000REQUEST_INVALID400Invalid request.Fix the request shape, path, method, body, or subscription payload before retrying.
3001REQUEST_INVALID_PARAMETERS400Invalid request parameters.Fix query or path parameters. Make sure signed path and transmitted path are identical.
3002REQUEST_INVALID_PRICE400Invalid price.Check price format, precision, instrument conditions, and whether the price is valid for the requested side.
3003REQUEST_INVALID_TIMEFRAME400Invalid timeframe.Use a supported timeframe for the requested market data endpoint.
3004REQUEST_INVALID_TIME_RANGE400Invalid time range.Fix from/to values. Keep the requested range within the allowed history window.
3005REQUEST_INVALID_COUNT400Invalid count.Use a valid count value for the request.
3006REQUEST_INVALID_LIMIT400Invalid limit.Use a valid limit value and stay within the allowed request size.
3007REQUEST_INVALID_CURSOR400Invalid cursor.Use the cursor exactly as returned by the API. Do not parse or modify it.
3008REQUEST_INVALID_PRICE_TYPE400Invalid price type.Use a supported price_type value for the requested market data endpoint.
3009REQUEST_INVALID_FILTER_COMBINATION400Invalid filter combination.Remove incompatible filters and retry with a supported combination.
3010REQUEST_UNSUPPORTED_MEDIA_TYPE400Unsupported request content type.Send JSON requests with Content-Type: application/json where a body is required.
3011REQUEST_METHOD_NOT_ALLOWED405Unsupported method.Use the HTTP method defined for this endpoint in the API reference.
3012REQUEST_ORDER_NOT_FOUND404Requested order was not found.Check the order identifier. Use only order IDs returned by the API and make sure the order belongs to the requested account.
3013REQUEST_POSITION_NOT_FOUND404Requested position was not found.Check the position identifier. Use only position IDs returned by the API and make sure the position still exists for the requested account.
3014REQUEST_OPERATION_NOT_FOUND404Requested operation was not found.Check the operation identifier. Use the operation_id returned in the ACK response or related event.
3015REQUEST_RATE_LIMIT429Endpoint rate limit exceeded.Stop immediate retries. Use GET /v1/configuration/accounts/{account_id}/limits, track usage locally, and wait until request capacity is available.
4000MARKET_INSTRUMENT_NOT_FOUND404Instrument not found.Request available instruments for the account and use an instrument name from that list.
4001MARKET_TRADE_DISABLED403Trading disabled for instrument.Do not send trading requests for this instrument until trading is enabled.
4002MARKET_CLOSE_ONLY403Instrument is close-only.Only close existing exposure for this instrument. Do not open new positions or pending orders.
4003MARKET_SESSION_CLOSED409Trading session is closed.Wait until the instrument trading session is open before sending the trading request.
4004MARKET_NO_QUOTES503No quotes available.Wait for a valid quote update and retry only if the operation is still intended.
5000TRADING_RULE_INVALID_VOLUME422Generic invalid volume.Check the instrument volume rules and send a valid volume.
5001TRADING_RULE_VOLUME_TOO_SMALL422Volume is too small.Increase volume to at least the instrument minimum volume.
5002TRADING_RULE_VOLUME_TOO_LARGE422Volume is too large.Reduce volume to the instrument maximum volume or lower.
5003TRADING_RULE_INVALID_VOLUME_STEP422Invalid volume step.Align volume to the instrument volume step.
5004TRADING_RULE_INVALID_REMAINING_VOLUME422Invalid remaining volume.Adjust the close or partial-close volume so the remaining position volume is valid.
5005TRADING_RULE_INVALID_PRICE_LEVELS422Order price levels are invalidCheck stop-loss, take-profit, pending order price, and minimum distance rules.
5006TRADING_RULE_INSUFFICIENT_MARGIN422Insufficient free margin.Reduce volume, free margin, or close exposure before retrying.
5007TRADING_RULE_MARGIN_LEVEL_TOO_LOW422Margin level too low.Reduce exposure or add margin before sending new trading requests.
5008TRADING_RULE_OPERATION_RESTRICTED422Position operation is not allowed.Check account and instrument restrictions. Send only operations allowed for the current state.
5009TRADING_RULE_TOO_MANY_PENDING_ORDERS422Pending order limit reached.Cancel old pending orders or reduce new pending order creation.
5010TRADING_RULE_TOO_MANY_OPEN_POSITIONS422Open position limit reached.Close existing positions or reduce new position creation.
6000EXECUTION_REQUOTE409Price changed.Refresh the current price and submit a new request only if the trade is still intended.
6001EXECUTION_REJECTED409Order rejected.Check request parameters, account state, instrument state, and recent transaction events before retrying.

Best Practices for Handling Errors

1. Double-check before you send

Always verify your details before submitting a trade request.

  • Ensure your volume meets the minimum, maximum, and step requirements.
  • Check that your price matches the required decimal precision.
  • Verify that the market is open and your account is active.

2. Know when to retry

It is safe to automatically retry your request if you experience a network timeout, a sudden disconnection, or if you aren't sure if the request went through. However, do not automatically retry if you receive validation errors (like invalid prices, invalid volumes, or closed markets) without fixing the underlying issue first.

3. Reconnecting

If you lose your connection, your previous session data won't automatically replay. When you reconnect:

  • Resubscribe to your data streams.
  • Download a new snapshot of your account state.
  • Cross-check your open orders and positions to ensure everything is up to date.

4. Common security signature mistakes

If your requests are failing due to a signature error, check for these common issues:

  • Your API keys or timestamps do not match your data.
  • You changed the request path or query details after you already signed it.
  • Your data encoding includes unnecessary padding.

Common scenarios & solutions

My order was accepted, but I didn't get a final result.

  • Check your connection to ensure you didn't miss the update.
  • Manually check the status of your operation using your account ID and operation ID.
  • If needed, reconnect and pull a fresh snapshot of your account.

I received a "Requote" error.

  • This means the price you requested has changed by more than your allowed settings.
  • Get the latest price update and try again.

My volume or stops are invalid.

  • For invalid volume, check the specific rules for that instrument and adjust your trade size accordingly.
  • For invalid stops, your Stop Loss or Take Profit is likely too close to the current market price. Move them further away and retry.

I am hitting request limits.

  • You have exceeded your allowed request frequency.
  • Track your usage, slow down your requests, and try to use streaming connections rather than repeatedly asking the server for updates.

Margin Requirement (HMR) Updates

Higher Margin Requirement (HMR) events are delivered directly through your main events stream.

ProblemLikely CauseHow to Fix It
Subscription rejectedYou are requesting an instrument that isn't available for your account.Check which instruments are available to you and only subscribe to those.
No HMR events receivedThere are no active or scheduled HMR periods right now.Keep your subscription active and wait for updates.
Out-of-sync informationYou missed an update or temporarily disconnected.Resubscribe and refresh your local data with a new snapshot.
HMR period disappearedPeriod was removed by removed_period_ids.Remove matching period_id from local HMR state.
HMR period changedPeriod was included in upserted_periods.Replace local period with the same period_id.