Coinpaprika API Kotlin Client

Version Travis-ci License Platform Kotlin 1.5.30

This library is written in Kotlin and provides a way to retrieve data from API. It uses Retrofit, Moshi and Kotlin coroutines.


  1. Add the following lines in your AndroidManifest.xml file

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  1. Edit module’s build.gradle file to attach the library by adding this line into it’s dependencies
implementation 'com.coinpaprika:apiclient:$library_version'


Coinpaprika delivers full market data to the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.

Instantiate Retrofit service and proceed with the call:

val retrofit = Retrofit.Builder()
val tickersService: TickersService = retrofit.create()
val tickers = tickersService.getTickers() // this function needs to be called in a coroutine
                                          // it can throw an HttpException or an IOException
for (ticker in tickers) {
    // - Coin identifier, to use in ticker(id:) method
    // - Coin name, for example Bitcoin
    // ticker.symbol - Coin symbol, for example BTC
    // ticker.rank - Position in Coinpaprika ranking (by MarketCap)
    // ticker.priceUsd - Price in USD
    // ticker.priceBtc - Price in BTC
    // ticker.dailyVolumeUsd - Volume from last 24h in USD
    // ticker.marketCapUsd - Market Capitalization in USD
    // ticker.circulatingSupply - Circulating Supply
    // ticker.totalSupply - Total Supply
    // ticker.maxSupply - Maximum Supply
    // ticker.percentChange1h - Percentage price change in last 1 hour
    // ticker.percentChange24h - Percentage price change in last 24 hours
    // ticker.percentChange7d - Percentage price change in last 7 days


CoinpaprikaAPI is available under the MIT license. See the LICENSE file for more info.


View Github