Skip to main content

CryptoDataPy

Better data beats advanced algorithms


CryptoDataPy is a python library which makes it easy to build high quality data pipelines for the analysis of digital assets. By providing easy access to over 100,000 time series for thousands of assets, it facilitates the pre-processing of a wide range of data from different sources.

Cryptoassets generate a huge amount of market, on-chain and off-chain data. But unlike legacy financial markets, this data is often fragmented, unstructured and dirty. By extracting data from various sources, pre-processing it into a user-friendly (tidy) format, detecting and repairing 'bad' data, and allowing for easy storage and retrieval, CryptoDataPy allows you to spend less time gathering and cleaning data, and more time analyzing it.

Our data includes:

  • Market: market prices of varying granularity (e.g. tick, trade and bar data, aka OHLC), for spot, futures and options markets, as well as funding rates for the analysis of cryptoasset returns.
  • On-chain: network health and usage data, circulating supply, asset holder positions and cost-basis, for the analysis of underlying crypto network fundamentals.
  • Off-chain: news, social media, developer activity, web traffic and search for project interest and sentiment, as well as traditional financial market and macroeconomic data for broader financial and economic conditions.

The library's intuitive interface facilitates each step of the ETL/ETL (extract-transform-load) process:

  • Extract: Extracting data from a wide range of data sources and file formats.
  • Transform:
    • Wrangling data into a pandas DataFrame in a structured and user-friendly format, a.k.a tidy data.
    • Detecting, scrubbing and repairing 'bad' data (e.g. outliers, missing values, 0s, etc.) to improve the accuracy and reliability of machine learning/predictive models.
  • Load: Storing clean and ready-for-analysis data and metadata for easy access.

Installation

$ pip install cryptodatapy

Usage

CryptoDataPy allows you to pull ready-to-analyze data from a variety of sources with only a few lines of code.

First specify which data you want with a DataRequest:

# import DataRequest
from cryptodatapy.extract.datarequest import DataRequest
# specify parameters for data request: tickers, fields, start date, end_date, etc.
data_req = DataRequest(
    source='glassnode',  # name of data source
    tickers=['btc', 'eth'], # list of asset tickers, in CryptoDataPy format, defaults to 'btc'
    fields=['close', 'add_act', 'hashrate'],  # list of fields, in CryptoDataPy, defaults to 'close'
    freq=None,  # data frequency, defaults to daily  
    quote_ccy=None,  # defaults to USD/USDT
    exch=None,  # defaults to exchange weighted average or Binance
    mkt_type= 'spot',  # defaults to spot
    start_date=None,  # defaults to start date for longest series
    end_date=None,  # defaults to most recent 
    tz=None,  # defaults to UTC time
    cat=None,  # optional, should be specified when asset class is not crypto, eg. 'fx', 'rates', 'macro', etc.
)

Then get the data :

# import GetData
from cryptodatapy.extract.getdata import GetData
# get data
GetData(data_req).get_series()

With the same data request parameters, you can retrieve the same data from a different source:

# modify data source parameter
data_req = DataRequest(
  source='coinmetrics',           
  tickers=['btc', 'eth'], 
  fields=['close', 'add_act', 'hashrate'], 
  req='d',
  start_date='2016-01-01')
# get data
GetData(data_req).get_series()

For more detailed code examples and interactive tutorials see here.

Supported Data Sources

Contributing

Interested in contributing? Check out the contributing guidelines and contact us at info@systamental.com. Please note that this project is s released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

cryptodatapy was created by Systamental. It is licensed under the terms of the Apache License 2.0 license.

Metadata

Release files for cryptodatapy 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryptodatapy 0.3.3
File Size Uploaded Provenance Actions
cryptodatapy-0.3.3.tar.gz 334.9 kB Without provenance Details for cryptodatapy-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cryptodatapy 0.3.3
File Interpreter ABI Platform Actions
cryptodatapy-0.3.3-py3-none-any.whl Python 3 none any Details for cryptodatapy-0.3.3-py3-none-any.whl

Total release size: 715.8 kB

Release files / cryptodatapy-0.3.3.tar.gz

Download URL cryptodatapy-0.3.3.tar.gz
Size 334.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a75d65415cd2daedf1c153e3c2dfcf9e791a100e518e9f002e748222c7c73eec
BLAKE2b-256 checksum
How to use checksums
7aeaea2604ba0b7e801b645790cdea606812db2a891d5bcf64bd71dcfbe9908d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.13 Darwin/25.1.0

Release files / cryptodatapy-0.3.3-py3-none-any.whl

Download URL cryptodatapy-0.3.3-py3-none-any.whl
Size 380.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4fcb8ae69dfc2baac4cb049c4ec25b137620c2012db4703eea52272ed3edf2b
BLAKE2b-256 checksum
How to use checksums
39bffc8d558ddf8bc9f50dbc41f676f2cd6fc964bb1197379d1206660b2d79a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.13 Darwin/25.1.0

Security for cryptodatapy 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page