ICommissionManager

StockSharp.Algo.Commissions

The commission calculating manager interface.

Implements: IAsyncPersistable

Properties

Commission
public decimal Commission { get; }
value = iCommissionManager.Commission

Total commission.

Rules
public ISynchronizedCollection<ICommissionRule> Rules { get; }
value = iCommissionManager.Rules

The list of commission calculating rules.

Methods

CloneAsync
public ValueTask<ICommissionManager> CloneAsync(CancellationToken cancellationToken)
result = iCommissionManager.CloneAsync(cancellationToken)

Create a copy of the manager.

cancellationToken
CancellationToken

Returns: Copy.

ProcessAsync
public ValueTask<decimal?> ProcessAsync(Message message, CancellationToken cancellationToken)
result = iCommissionManager.ProcessAsync(message, cancellationToken)

To calculate commission.

message
The message containing the information about the order or own trade.
cancellationToken
CancellationToken

Returns: The commission. If the commission cannot be calculated then will be returned.

Reset
public void Reset()
iCommissionManager.Reset()

To reset the state.