CandlesImp..::..GetCandlesAsync Method
Get candle data (OHLCV) as an asynchronous operation.
Namespace:
CoinCapApi.ImpAssembly: CoinCapApi (in CoinCapApi.dll)
Syntax
public Task<CandlesResponse> GetCandlesAsync( string exchangeId, TimeInterval interval, string baseId, string quoteId, ulong start, ulong end )
Public Function GetCandlesAsync ( _ exchangeId As String, _ interval As TimeInterval, _ baseId As String, _ quoteId As String, _ start As ULong, _ end As ULong _ ) As Task(Of CandlesResponse)
Parameters
- exchangeId
- Type: String
The unique identifier of the exchange.
- interval
- Type: CoinCapApi.Types..::..TimeInterval
The interval to bucket data.
- baseId
- Type: String
The base asset identifier.
- quoteId
- Type: String
The quote asset identifier.
- start
- Type: UInt64
UNIX time in milliseconds. omitting will return the most recent candles.
- end
- Type: UInt64
UNIX time in milliseconds. omitting will return the most recent candles.
Return Value
A Task<CandlesResponse> representing the asynchronous operation.Exceptions
Exception | Condition |
---|---|
ArgumentNullException | exchangeId - Null or invalid value, exchangeId must be a valid exchange id. |
ArgumentNullException | baseId - Null or invalid value, baseId must be a valid asset id. |
ArgumentNullException | quoteId - Null or invalid value, quoteId must be a valid asset id. |
ArgumentOutOfRangeException | Invalid start/end values, start and end must both be valid timestamps. |
ArgumentOutOfRangeException | end - Invalid value, end must be a valid timestamp greater than start. |
ArgumentOutOfRangeException | start - Invalid value, start must be in the past. |