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
requireFinalbooltrueto wait until final values are available,falseto return the current snapshot.Note that if the value is
falsethe method returns immediately. If the value istruethe 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
requireFinalis set totruebut the parent trade API client of the bracketed order was terminated before the final report could be obtained.