Async C# Client for the CoinPaprika API. The current version supports CoinPaprika API v1.5.
CoinPaprika delivers full market data to the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.
CoinPaprika API Client is availabe on Nuget.
The library depends on JSON.net, which is just simply the best Json-library for .NET; It should get installed automatically (with the Nuget package), but depending on your project, you may have to install it manually via Nuget Package Manager/CLI.
This library is using .NET Standard 2.0, you can check compatibility of your project here.
CoinpaprikaAPI.Client client = new CoinpaprikaAPI.Client();
All requests return a CoinPaprikaEntity with a generic type (TPaprikaEntity). The CoinPaprikaEntity provides these properties:
Value, based on the type specified by the API callRaw, json value returned by the API)Error, may be an HTTP-Error or an API-Error (check the ErrorMessage property for details)RawError, json value of the Error property
If the call was succesfull, Error is null and Value provides the returned data from the API.
var globals = await client.GetClobalsAsync();
returns single CoinPaprikaEntity of Type Global
var coins = await client.GetCoinsAsync();
returns CoinPaprikaEntity with a List of objects of Type CoinInfo
var coins = await client.GetCoinByIdAsync("btc-bitcoin");
returns single CoinPaprikaEntity of Type ExtendedCoinInfo
var coins = await client.GetTwitterTimelineForCoinAsync("btc-bitcoin");
returns CoinPaprikaEntity with a List of objects of Type CoinTweetInfo
var coins = await client.GetEventsForCoinAsync("btc-bitcoin");
returns CoinPaprikaEntity with a List of objects of Type CoinEventInfo
var coins = await client.GetExchangesForCoinAsync("btc-bitcoin");
returns CoinPaprikaEntity with a List of objects of Type ExchangeInfo
var coins = await client.GetMarketsForCoinAsync("btc-bitcoin");
returns CoinPaprikaEntity with a List of objects of Type MarketInfo
var coins = await client.GetLatestOhlcForCoinAsync("btc-bitcoin", "USD");
returns CoinPaprikaEntity with a List of objects of Type OhlcValue
var firstOfMonth = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
var end = DateTime.Now.Subtract(TimeSpan.FromDays(1));
var ohlcvHistorical = await _client.GetHistoricalOhlcForCoinAsync("btc-bitcoin", new DateTimeOffset(firstOfMonth), end, 200, "USD");
returns single CoinPaprikaEntity with a List of objects of Type OhlcValue
var coins = await client.GetTodayOhlcForCoinAsync("btc-bitcoin", "USD");
returns CoinPaprikaEntity with a List of objects of Type OhlcValue
var tickers = await client.GetTickers(new[] { "USD", "CHF", "BTC" });
returns CoinPaprikaEntity with a List of objects of Type TickerWithQuotesInfo
var ticker = await client.GetTickerForCoin("btc-bitcoin");
returns single CoinPaprikaEntity of Type TickerInfo
var ticker = await _client.GetHistoricalTickerForIdAsync(id, new DateTimeOffset(DateTime.Now.Subtract(TimeSpan.FromDays(1))), DateTimeOffset.Now, 1000, "USD", TickerInterval.OneHour);
returns CoinPaprikaEntity with a List of objects of Type HistoricalTickerInfo
var exchanges = await client.GetExchangesAsync(new[] { "USD", "CHF", "BTC" });
returns CoinPaprikaEntity with a List of objects of Type ExtendedExchangeInfo
var ticker = await client.GetExchangeByIdAsync("binance", new[] { "USD", "CHF", "BTC" });
returns single CoinPaprikaEntity of Type ExtendedExchangeInfo
var markets = await client.GetMarketsByExchangeIdAsync("binance");
returns CoinPaprikaEntity with a List of objects of Type ExchangeMarketInfo
var person = await client.GetPeopleByIdAsync("vitalik-buterin");
returns single CoinPaprikaEntity of Type PersonInfo
var tags = await client.GetTagsAsync(new[] { "coins", "icos" });
returns CoinPaprikaEntity with a List of objects of Type TagInfo
var tag = await client.GetTagByIdAsync("smart-contracts", new[] { "coins", "icos" });
returns single CoinPaprikaEntity of Type TagInfo
var searchterms = "coin";
//passing in null searches all categories
var searchResult = await client.SearchAsync(searchTerms, 10, null);
returns CoinPaprikaEntity of Type SearchResult
var converionResult = await _client.ConvertAsync("btc-bitcoin", "eth-ethereum", 1.5);
returns CoinPaprikaEntity of Type PriceConversionInfo
CoinPaprika C# Client is availabe unter the MIT license, see also the LICENSE file.