Skip to content

MT4Account.OnOpenedOrdersProfitAsync method

Subscribes to real-time profit updates for open orders.

public IAsyncEnumerable<OnOpenedOrdersProfitData> OnOpenedOrdersProfitAsync(int intervalMs = 1000, 
    CancellationToken cancellationToken = default)
parameter description
intervalMs Polling interval in milliseconds.
cancellationToken Optional cancellation token.

Return Value

Async stream of profit update snapshots for open orders.

Exceptions

exception condition
ConnectExceptionMT4 Thrown if the account is not connected.
RpcException If the stream fails.
ApiExceptionMT4 Thrown if the stream returns a known API error.

See Also