Library for fetching coin/token historical data, trends and more.


License
MIT
Install
pip install karpet==0.4.8

Documentation

WARNING

Thanks to GitHub's hostile policy the repository has migrated to Gitlab.

This repository won't be updated anymore.

image

PyPI

PyPI - License

PyPI - Downloads

Karpet

Karpet is a tiny library with just a few dependencies for fetching coins/tokens metrics data from 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)
  • twitter scraping for the given keywords (no limits)
  • much more info about crypto coins/tokens (no rate limits)

What is upcoming?

  • Reddit metrics
  • Have a request? Open an issue ;)

Dependencies

Library uses a few nifty dependencies and is Python 3.6+ only. There is no need to install dependencies you don't need. Therefore this library utilizes extras which install optional dependencies:

  • for Google trends - google

Usage

  1. Install the library via pip.
  1. Import the library class first.

fetch_crypto_historical_data()

Retrieves historical data.

fetch_crypto_exchanges()

Retrieves exchange list.

Retrieves Google Trends - in percents for the given date range.

image

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

image

fetch_news()

Retrieves crypto news.

fetch_top_news()

Retrieves top crypto news in 2 categories:

  • Editor's choices - articles picked by editors
  • Hot stories - articles with most views

get_coin_ids()

Resolves coin ID's based on the given symbol (there are coins out there with identical symbol).

Use this to get distinctive coin ID which can be used as id param for method fetch_crypto_historical_data().

get_basic_data()

Fetches coin/token basic data like:

open_issues is only provided if total_issues and closed_issues are available.

get_quick_search_data()

Lists all coins/tokes with some basic info.

fetch_crypto_live_data()

Retrieves live market data.

Changelog

[here](./CHANGELOG.md)

Credits

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.