Skip to main content

Library for fetching coin/token metrics data from the internet.

Project description


Karpet is a tiny library with just a few dependencies for fetching coins/tokens metrics data the internet.

It can provide following data:

  • coin/token historical price data (no limits)

  • google trends for the given list of keywords (longer period than official API)

What is upcoming?

  • Reddit metrics

  • Have a request? Open an issue ;)


Library uses a few nifty dependencies and is Python 3.6+ only:

  • pandas

  • numpy

  • coinmarketcap

  • pytrends


Install the library via pip.

~ pip install karpet

Import the library class first.

from karpet import Karpet

Symbol (ticker) -> URL slug conversion.

c = Karpet(date(2019, 1, 1), date(2019, 5, 1))
c.get_coin_slug("BTC")  # bitcoin

Retrieving historical data.

c = Karpet(date(2019, 1, 1), date(2019, 5, 1))
df = c.fetch_crypto_historical_data(coin="bitcoin")  # Dataframe with historical data
c = Karpet(*get_last_week())
df = c.fetch_google_trends(kw_list=["bitcoin"])  # Dataframe with trends.

And with a few lines of code you can get a chart

df = df.set_index("date")


This is my personal library I use in my long-term project. I can pretty much guarantee it will live for a long time then. I will add new features over time and I more than welcome any help or bug reports. Feel free to open an issue or merge request.

The code is is licensed under MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

karpet-0.1.tar.gz (4.5 kB view hashes)

Uploaded source

Built Distribution

karpet-0.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page