CryptoPrice

Get real-time crypto prices with one line of code. You will need to use your own API Key. In order to obtain a free API Key, head over to: https://p.nomics.com/cryptocurrency-bitcoin-api


Keywords
crypto, price, api, bitcoin, ethereum, solana, bnb, coinbase, nomics
License
MIT
Install
Install-Package CryptoPrice -Version 0.0.2

Documentation

About CryptoPrice

Cryptocurrency is hot right now. It remains unclear how it will perform in the future, but until then, it is the trending topic on the horizon. CryptoPrice is a library to obtain real-time price information on cryptocurrencies. It's .NET implementation is lightweight, fast, and easy to use.

Get started with CryptoPrice

Note: In order to use CryptoPrice, you will need to obtain a free API Key from nomics.com

  1. Insallation .NET CLI:
dotnet add package CryptoPrice --version 0.0.2

Nuget Package: https://www.nuget.org/packages/CryptoPrice/

  1. Once the package is installed add the following to the top of your class.
using CryptoPrice;
  1. Getting the current price of Bitcoin
using System;
using CryptoPrice;
namespace TestNugets
{
    class Program
    {
        static void Main(string[] args)
        {
            //Initalize the library by passing your API key into it.
            CryptoCore _CryptoPrice = new CryptoCore("YOUR_API_KEY");
            
            //Get the current price of Bitcoin
            double BitcoinPrice = _CryptoPrice.GetCryptoPrice("BTC");

            //Output to console
            Console.WriteLine(BitcoinPrice);
        }
    }
}

Console Output

58942.97387688
  1. Configure the currecy you would like to see the price of crypto in.
using CryptoPrice.Definitions;
  1. Setting the currency to Euro.
using System;
using CryptoPrice;
using CryptoPrice.Definitions;
namespace TestNugets
{
    class Program
    {
        static void Main(string[] args)
        {
            //Initalize the library by passing your API key into it.
            CryptoCore _CryptoPrice = new CryptoCore("YOUR_API_KEY");

            //Set the currency for the price return - Default is USD.
            _CryptoPrice.SetCurrency = Fiat.EUR;

            //Get the current price of Bitcoin
            double BitcoinPrice = _CryptoPrice.GetCryptoPrice("BTC");

            //Output to console
            Console.WriteLine(BitcoinPrice);
        }
    }
}

Console Output

52928.63502381

Nuget Package

https://www.nuget.org/packages/CryptoPrice/