MT4Account.AccountSummaryAsync method
Asynchronously retrieves summary information about the currently connected MT4 trading account.
public Task<AccountSummaryData> AccountSummaryAsync(DateTime? deadline = default,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| deadline | Optional gRPC deadline for the request. If not specified, the default timeout will apply. |
| cancellationToken | Optional CancellationToken to cancel the request. |
Return Value
A task that resolves to an AccountSummaryData object containing details such as balance, equity, leverage, currency, server time, and other account attributes.
Exceptions
| exception | condition |
|---|---|
| ConnectExceptionMT4 | Thrown if the account is not connected (i.e., connection ID is not initialized). |
| ApiExceptionMT4 | Thrown if the gRPC server returns an error response. |
See Also
- class AccountSummaryData
- class MT4Account
- namespace mt4_term_api