Table of Contents

Method GetLatestTickersAsync

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

GetLatestTickersAsync(IReadOnlyList<SymbolPair>?, CancellationToken)

Sends a request to retrieve latest tickers for selected symbol pairs.

Task<IReadOnlyList<Ticker>> GetLatestTickersAsync(IReadOnlyList<SymbolPair>? symbolPairs, CancellationToken cancellationToken = default)

Parameters

symbolPairs IReadOnlyList<SymbolPair>

Symbol pairs to get ticker data for, or null to get all available tickers on the exchange. The list must not be empty.

cancellationToken CancellationToken

Cancellation token that allows the caller to cancel the operation.

Returns

Task<IReadOnlyList<Ticker>>

List of requested tickers.

Exceptions

InvalidArgumentException

Thrown if symbolPairs is empty, or if it contains duplicate entries.

NotAvailableException

Thrown if at least one of the requested symbol pairs is not supported on the exchange or if the used connection has not been created with MarketData support.

MalfunctionException

Thrown if an internal unexpected error occurred.

NotConnectedException

Thrown if the request could not be sent.

OperationCanceledException

Thrown if the operation was cancelled including cancellation due to shutdown or object disposal.

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.

OperationFailedException

Thrown if the request failed for an unknown reason with an unknown outcome.

See Also