Skip to main content

Recommended Integration Flow

A high-level implementation path that connects onboarding, host selection, state sync, market data, trading, and error handling.

  1. 1
    Create an API key and store credentials securely.
  2. 2
    Authenticate every request with signed EXN-* headers.
  3. 3
    Select the host or resolve the account access point when required.
  4. 4
    Request effective API limits, throttling, contract constants.
  5. 5
    Read account, instrument, and configuration data.
  6. 6
    Subscribe to transaction events and market data.
  7. 7
    Send trading requests with non-empty idempotency keys.
  8. 8
    Process ACK, transaction_event, and operation status.
  9. 9
    Handle errors using HTTP status, Public API error code, and client action.
  10. 10
    Monitor margin, HMR, rate limits, and client tiers when final source is available.

Example pseudo-code

credentials = load_credentials()
base_url = load_configured_api_host()
account = get_account(account_id)
limits = get_limits(account_id)
configure_client_rate_limits(limits)
instruments = get_available_instruments(account_id)
conditions = get_instrument_conditions(account_id, "EURUSD")
subscribe("transactions", account_id)
trading_state = wait_for_initial_trading_state_snapshot()
subscribe("instruments", account_id, instruments=["EURUSD"])
subscribe("hmr", account_id, instruments=["EURUSD"])
subscribe("ticks", account_id, instruments=["EURUSD"])
last_tick = wait_for_initial_tick("EURUSD")
operation = open_position(account_id, instrument="EURUSD", side="buy", volume="0.10", idempotency_key=new_key())
final_result = wait_for_transaction_event(operation.operation_id) or poll_operation_status(operation.operation_id)
handle_result_or_error(final_result)
on_reconnect:
resubscribe()
reconcile_with_trading_snapshot()

Decision points

DecisionPreferred behavior
Need read-only integration?Use Info API key and avoid mutating endpoints.
Need trading integration?Use Exness API key, idempotency, and async event processing.
Need request limits?Use GET /v1/configuration/accounts/{account_id}/limits.
Temporary error?Retry with backoff only when safe.
Validation/business error?Change request or account state before retrying.