CoinsImp..::..GetCoinOhlcHistoricAsync Method
Get Open/High/Low/Close values with volume and market capitalization for any date range. If the end date is the current day, data can change with every request until actual close of the day.
Namespace:
CoinpaprikaApi.ImpAssembly: CoinpaprikaApi (in CoinpaprikaApi.dll)
Syntax
public Task<IEnumerable<OhlcvItem>> GetCoinOhlcHistoricAsync( string coin_id, DateTimeOffset start, Nullable<DateTimeOffset> end, uint limit, bool btc_quote )
Public Function GetCoinOhlcHistoricAsync ( _ coin_id As String, _ start As DateTimeOffset, _ end As Nullable(Of DateTimeOffset), _ limit As UInteger, _ btc_quote As Boolean _ ) As Task(Of IEnumerable(Of OhlcvItem))
Parameters
- coin_id
- Type: String
The coin identifier (ex: btc-bitcoin).
- start
- Type: DateTimeOffset
The start start point for historical data.
- end
- Type: Nullable<(Of <(<'DateTimeOffset>)>)>
The end point for for historical data (max 1 year). If not provided calculated by the limit parameter.
- limit
- Type: UInt32
The limit of result rows (max 366). Default: 1
- btc_quote
- Type: Boolean
If set to true the quote currency is BTC, otherwise quote currency is USD.
Return Value
A Task<IEnumerable<OhlcvItem>> representing the asynchronous operation.Exceptions
Exception | Condition |
---|---|
ArgumentNullException | coin_id - Invalid value, coin_id must be a valid coin identified (ex: btc-bitcoin) |
ArgumentNullException | start |
ArgumentOutOfRangeException | start - Invalid value, start must be a reasonable value. |
ArgumentOutOfRangeException | end - Invalid value, end must be a maximum of 1 year from start. |
ArgumentOutOfRangeException | end - Invalid value, end must be greater than start. |