Skip to main content

A package to export bulk data from the CoinGecko API.

Project description

CoinGecko Exporter

CoinGecko Exporter is a Python package that allows you to fetch and export cryptocurrency data from the CoinGecko API. The data can be exported in various formats including Pandas DataFrame, SQLite, and DuckDB.

Features

  • Fetch cryptocurrency market data asynchronously.
  • Retrieve historical timeseries data for multiple cryptocurrencies.
  • Export data in Pandas DataFrame, SQLite, or DuckDB format.

Installation

You can install the package using pip:

pip install coingecko-exporter

Usage

Below is an example of how to use the CoinGecko Exporter package:

import asyncio
from coingecko_exporter import CoinGeckoExporter

api_key = "YOUR_API_KEY"
cg = CoinGeckoExporter(api_key=api_key)

# Number of coins to fetch
coins = 3000

# Fetch data and export as DataFrame
coins_df, historical_data_df = cg.export_data(coins=coins, export_format='df')

# Export data to SQLite
cg.export_data(coins=coins, export_format='sqlite')

# Export data to DuckDB
cg.export_data(coins=coins, export_format='duckdb')

API Reference

CoinGeckoExporter

__init__(self, api_key)

Initializes the CoinGeckoExporter with the provided API key.

  • api_key: Your CoinGecko API key.

export_data(self, coins, export_format='df')

Fetches and exports CoinGecko data.

  • coins: Number of coins to fetch.
  • export_format: Export format. Options are 'df', 'sqlite', or 'duckdb'. Default is 'df'.

License

This project is licensed under the 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

coingecko_exporter-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

coingecko_exporter-0.1.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file coingecko_exporter-0.1.2.tar.gz.

File metadata

  • Download URL: coingecko_exporter-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for coingecko_exporter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d595cd47e48c6067590670f4a91bfdcc0ef80fa3d4e075bbd0e8c13a61da5f5c
MD5 db9ab5b67237eefe7063f3409a0b3b2c
BLAKE2b-256 3d9a4dffd417419e80a10db576385fe46b5900c69814c14a8638f6d0b9198d63

See more details on using hashes here.

File details

Details for the file coingecko_exporter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for coingecko_exporter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 976f7510eac03b2fe59f4437f1fff4f08d2a8d86c94ca743d511380689769b7f
MD5 1829ca3394bc0cd4090fff9562147ecf
BLAKE2b-256 4aa80f5d4615a958de869830084c3ce3fe33a87438d7d018ef91efa4f6940ed4

See more details on using hashes here.

Supported by

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