Method GetWithdrawalsAsync
- Namespace
- WhalesSecret.TradeScriptLib.API.TradingV1
- Assembly
- WhalesSecret.TradeScriptLib.dll
GetWithdrawalsAsync(DateOnly, DateOnly, CancellationToken)
Gets withdrawals from the exchange account.
Task<IReadOnlyList<WithdrawalInformation>> GetWithdrawalsAsync(DateOnly startDate, DateOnly endDate, CancellationToken cancellationToken = default)
Parameters
startDateDateOnlyInclusive UTC start date of the period to get the withdrawals from.
endDateDateOnlyInclusive UTC end date of the period to get the withdrawals from.
cancellationTokenCancellationTokenCancellation token that allows the caller to cancel the operation.
Returns
- Task<IReadOnlyList<WithdrawalInformation>>
List of withdrawals within the given period.
Exceptions
- InvalidArgumentException
Thrown if
startDateis greater thanendDate.- NotAvailableException
Thrown if the connection does not support trading.
- NotConnectedException
Thrown if the connection strategy is FailInstantlyIfNotConnected and the connection to the exchange is interrupted.
- 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.
- OperationCanceledException
Thrown if the operation was cancelled, including cancellation during the shutdown.