Table of Contents

Method WaitForPartialFillOrCloseAsync

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

WaitForPartialFillOrCloseAsync(CancellationToken)

Waits for a fill (partial or full) to occur or until the order is cancelled.

Task<IReadOnlyList<FillData>> WaitForPartialFillOrCloseAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token that allows the caller to cancel the operation.

Returns

Task<IReadOnlyList<FillData>>

Fill data objects, or an empty collection. The empty collection is returned in the following scenarios:

  • If the order itself was canceled.
  • If the order itself was filled and all (partial) fills has been already published.

Exceptions

OperationCanceledException

Thrown if the operation was cancelled.

NotConnectedTimeoutException

Thrown if the connection strategy associated with this instance is BlockUntilReconnectedOrTimeout with non-infinite timeout value and this timeout expired while the connection to the exchange is interrupted. That is, this exception does not limit the request itself, it rather limits the period of time that allows the client to recover from the interruption of the connection to the exchange.

NotConnectedException

Thrown if the connection strategy is FailInstantlyIfNotConnected and the connection to the exchange is interrupted.