MetaTrader 5 icon

MetaTrader 5

Interact with MetaTrader 5 trading platform via WebAPI

User Account → Get User by External ID

AI-generated

Summary

Retrieves a user account from the MetaTrader 5 platform using an external trading system account number.

Inputs

  • externalAccount — External trading system account number identifying the user in the trading system.
  • simplify — Whether to return a simplified version of the response instead of the raw data. Defaults to true.

Output shape

If simplify is enabled (default), returns a simplified user object with fields Login, Name, Email, MQID, Rights, Balance, Credit, Leverage, and LastAccess. If simplify is disabled, returns the raw API answer from the MetaTrader 5 WebAPI endpoint GET /api/user/get_external?account={externalAccount}.

The operation requires valid MetaTrader 5 API credentials (server, port, login, password) for authentication. The externalAccount parameter maps to the account query parameter in the API request.

Examples

Example 1: Get user details by external account number 12345 with simplified output.

Set externalAccount to '12345' and leave simplify at its default true value.

Discussion