CoinsImp..::..GetCoinOhlcAsync Method
Get coin's OHLC (open, high, low, close) data (granularity auto).
Namespace:
CoinGeckoAPI.Imps* 1 - 2 days: 30 minutes
* 3 - 30 days: 4 hours
* 31 days and beyond: 4 days
Assembly: CoinGeckoAPI (in CoinGeckoAPI.dll)
Syntax
Parameters
- id
- Type: String
The id of the coin cryptocurrency. See GetCoinsListAsync(Boolean).
- vs_currency
- Type: String
The target currency of market data (usd, eur, jpy, etc.). See GetSupportedVSCurrenciesAsync()()()().
- days
- Type: UInt32
Data up to number of days ago (1/7/14/30/90/180/365/max).
Return Value
A Task<System.Decimal[]> representing the asynchronous operation.Exceptions
Exception | Condition |
---|---|
ArgumentNullException | id - Invalid value. Value must be a valid coin id (EX: bitcoin, ethereum) |
ArgumentNullException | vs_currency - Invalid value. Value must be a valid target currency of market data (usd, eur, jpy, etc.) |