CoinGeckoApiFix class
Coin Gecko service to get real-time exchange trading values.
WARNING This code will eventualy be removed from this project as it's not a core Cardano wallet feature.
- Inheritance
-
- Object
- CoinGeckoApi
- CoinGeckoApiFix
Constructors
Properties
- dio ↔ Dio?
-
getter/setter pairinherited
- enableLogging ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- requestCount ↔ int
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCoinData(
{required String id, bool localization = false, bool tickers = true, bool marketData = true, bool communityData = true, bool developerData = true, bool sparkline = false}) → Future< CoinGeckoResult< Coin> > -
Get current data (name, price, market, ... including exchange tickers) for a coin
@id *-string - coin id ex : bitcoin
@localization -boolean(d:T) - include all localized languages in response
@tickers -boolean(d:T) - include ticker data
@market_data -boolean(d:T) - include market data
@community_data -boolean(d:T) - include community data
@developer_data -boolean(d:T) - include developer data
@sparkline -boolean(d:F) - inmclude sparkline 7 days data
inherited
-
getCoinHistory(
{required String id, required DateTime date, bool localization = true}) → Future< CoinGeckoResult< Coin> > -
Get historical data (name, price, market, stats) at a given date for a coin
@id *- string - coin id, ex : bitcoin
@date *- string - dd-mm-yyyy
@localization - boolean- set false to exclude localized languages
inherited
-
getCoinMarketChart(
{required String id, required String vsCurrency, required int days, ChartTimeInterval interval = ChartTimeInterval.EMPTY}) → Future< CoinGeckoResult< List< >CoinDataPoint> > -
Get historical market data include price, market cap, and 24h volume (granularity auto)
inherited
-
getCoinMarketChartRanged(
{required String id, required String vsCurrency, required DateTime from, required DateTime to}) → Future< CoinGeckoResult< List< >CoinDataPoint> > -
Get historical market data include price, market cap, and 24h volume (granularity auto)
inherited
-
getCoinMarkets(
{required String vsCurrency, List< String> coinIds = const [], CoinCategories category = CoinCategories.ALL, CoinMarketOrder order = CoinMarketOrder.MARKET_CAP_DESC, int itemsPerPage = 100, int page = 1, bool sparkline = false, List<MarketInterval> priceChangePercentage = const []}) → Future<CoinGeckoResult< List< >FullCoin> > -
List all supported coins price, market cap, volume, and market related data
@vs_currency *- string - target currency of market data
@ids - string - ids of coins separated by comma
@category - string - filter by coin category, only decentralized_finance_defi and stablecoins are supported at the moment
@order - string - sort results by field market_cap_desc, gecko_desc, gecko_asc, market_cap_asc, market_cap_desc, volume_asc, volume_desc, id_asc, id_desc
@per_page - integer- 1...250, default 100 items per page
@page - integer- page number
@sparkline - boolean- include sparkline 7 days data (default:false)
@price_change_percentage - string - Include price change percentage in 1h, 24h, 7d, 14d, 30d, 200d, 1y
inherited
-
getCoinTickers(
{required String id, List< String> exchangeIds = const [], bool includeExchangeLogo = true, int page = 1, TickerOrdering order = TickerOrdering.TRUST_SCORE_DESC, bool depth = true}) → Future<CoinGeckoResult< List< >CoinTicker> > -
Get coin tickers
@id *- string - coin id ex : bitcoin
@exchange_ids - string - exchange ids separate by comma
@include_exchange_logo - boolean- true/false
@page - 100 tickers per page, page no.
@order - valid values: trust_score_desc (default), trust_score_asc and volume_desc
@depth - flag to show 2% orderbook depth. valid values: true, false
inherited
-
getContractMarketChart(
{required String id, required String contract_address, required String vsCurrency, required int days}) → Future< CoinGeckoResult< List< >CoinDataPoint> > -
@id *- id
@contract_address *- string
@vs_currency *- string
@days *- int
inherited
-
getContractMarketChartRanged(
{required String id, required String contract_address, required String vsCurrency, required DateTime from, required DateTime to}) → Future< CoinGeckoResult< List< >CoinDataPoint> > -
@id *- String - (only ethereum allowed for now) otherwise 500 error
@contract_address *- String
@vs_currency *- String
@from *- int
@to *- int
inherited
-
getContractTokenData(
{required String id, required String contract_address}) → Future< CoinGeckoResult< ContractToken> > -
inherited
-
getExchangeRatesBtc(
) → Future< CoinGeckoResult< ExchangeRates> > -
no params
Get BTC-to-Currency exchange rates
inherited
-
getExchanges(
{int page = 1, int per_page = 100}) → Future< CoinGeckoResult< List< >Exchange> > -
@page - int
@per_page - int
inherited
-
getGlobalCoins(
) → Future< CoinGeckoResult< GlobalCoins> > -
inherited
-
getGlobalDefi(
) → Future< CoinGeckoResult< GlobalDefi> > -
inherited
-
getSearchTrending(
) → Future< CoinGeckoResult< SearchTrending> > -
inherited
-
listCoins(
{bool includePlatformFlag = false}) → Future< CoinGeckoResult< List< >Coin> > -
@param includePlatformFlag *- bool
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
) → Future< CoinGeckoResult< bool> > -
- Coingecko API ( GET /ping )
override -
simplePrice(
{required List< String> ids, required List<String> vs_currencies, bool includeMarketCap = false, bool include24hVol = false, bool include24hChange = false, bool includeLastUpdatedAt = false}) → Future<CoinGeckoResult< List< >PricedCoin> > -
inherited
-
simpleSupportedVsCurrencies(
) → Future< CoinGeckoResult< List< >String> > -
inherited
-
simpleTokenPrice(
{required String id, required List< String> contractAddresses, required List<String> vs_currencies, bool includeMarketCap = false, bool include24hVol = false, bool include24hChange = false, bool includeLastUpdatedAt = false}) → Future<CoinGeckoResult< List< >SimpleToken> > -
only ethereum works for /{id} as of Apr 16 2021
Api Limitation, not library
inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited