Official CoinPaprika API Kotlin/Android client building blocks
Retrofit
instance.
build.gradle
or build.gradle.kts
file.
INTERNET
permission in your AndroidManifest.xml
.
Retrofit
instance. You must provide the base URL and a converter factory.
TickersService
.
getCoins()
: Lists all available coins.getCoin(id)
: Retrieves details for a specific coin ID.getCoinEvents(id)
: Gets events related to a coin.getCoinExchanges(id)
: Gets exchanges where a coin is listed.getCoinMarkets(id, quotes)
: Gets market data for a coin.getCoinTweets(id)
: Gets the latest tweets for a coin.getCoinOHLCV(id, quotes)
: Gets the latest OHLCV data.getHistoricalCoinOHLCV(...)
: Gets historical OHLCV data.getExchanges(quotes)
: Lists all exchanges.getExchange(id, quotes)
: Retrieves details for a specific exchange.getExchangeMarkets(id, quotes)
: Gets all markets for a specific exchange.getGlobalStats(quotes)
: Retrieves global cryptocurrency market statistics.getPerson(id)
: Retrieves details for a specific person by ID.search(...)
: Searches for coins, exchanges, people, and more.getTags(sortBy)
: Lists all tags.getTag(id)
: Retrieves details for a specific tag.getTicker(id, quotes)
: Retrieves the ticker for a specific coin ID.getTickers(quotes, page)
: Lists tickers for all coins.try-catch
block to handle potential exceptions, such as HttpException
from Retrofit for non-2xx responses or IOException
for network failures.
retrofit2
moshi
(or another JSON converter)okhttp3