Table of Contents

Method GetProfitAndFeesReportAsync

Namespace
WhalesSecret.TradeScriptLib.API.TradingV1.Orders.Brackets
Assembly
WhalesSecret.TradeScriptLib.dll

GetProfitAndFeesReportAsync(bool)

Gets information about cumulative profits (losses) and fees paid by orders related to a single bracketed order.

Task<ProfitAndFeesReport> GetProfitAndFeesReportAsync(bool requireFinal)

Parameters

requireFinal bool

true to wait until final values are available, false to return the current snapshot.

Note that if the value is false the method returns immediately. If the value is true the method returns immediately only if the final information is available, otherwise it waits until the bracketed order is completed and until the information is collected.

Returns

Task<ProfitAndFeesReport>

Information about cumulative profits (losses) and fees paid by orders related to a single bracketed order.

Remarks

If requireFinal is false, the returned dictionary is a snapshot at the time of the call and the actual values may change in the future. If requireFinal is true, the values are final as they are collected after all relevant orders have completed.

Exceptions

OperationCanceledException

Thrown if requireFinal is set to true but the parent trade API client of the bracketed order was terminated before the final report could be obtained.