Skip to main content

Download Crypto Currency Data from different exchanges.

Project description

PyPI - Python Version PyPI CI License Documentation Status

Python package to download crypto-currency data (OHLCV, trades, order book) from multiple exchanges via REST and WebSocket APIs. Data can be saved to CSV, Excel, SQLite, PostgreSQL, or Parquet.

Installation

From pip:

$ pip install dccd

With optional Parquet / Polars support:

$ pip install "dccd[io]"

From source:

$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
$ cd Download_Crypto_Currencies_Data
$ pip install -e .

Supported exchanges

Exchange

Historical

Real-time

Binance

Coinbase

Kraken

Bybit

OKX

Bitfinex

Bitmex

Presentation

Historical Downloader dccd.histo_dl

Download OHLCV data via REST APIs and save to disk. Supports chunked requests, automatic retry on rate-limit (HTTP 429), and incremental updates from the last saved timestamp.

Continuous Downloader dccd.continuous_dl

Stream real-time data (order book, trades) via WebSocket with automatic reconnection and configurable processing/saving callbacks.

Output formats

Historical data can be saved as CSV, Excel (.xlsx), SQLite, PostgreSQL (via SQLAlchemy), or Parquet (requires dccd[io]). Parquet files can be read back as either a pandas.DataFrame or a polars.DataFrame.

Quick start

Historical data (pandas):

from dccd.histo_dl import FromBinance

obj = FromBinance('/path/to/data/', 'BTC', 3600, fiat='USDT')
obj.import_data(start='2024-01-01 00:00:00', end='2024-12-31 00:00:00')
obj.save(form='parquet')
df = obj.get_data()            # pandas DataFrame

Polars output:

df_pl = obj.get_data(format='polars')

Incremental update (resume from last saved point):

obj.import_data(start='last', end='now').save(form='parquet')

Other exchanges:

from dccd.histo_dl import FromKraken, FromBybit, FromOKX

FromKraken('/path/', 'ETH', 3600).import_data(start='2024-01-01', end='now').save()
FromBybit('/path/', 'BTC', 86400).import_data(start='2024-01-01', end='now').save()
FromOKX('/path/', 'BTC', 3600).import_data(start='2024-01-01', end='now').save()

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

dccd-2.0.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dccd-2.0.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file dccd-2.0.1.tar.gz.

File metadata

  • Download URL: dccd-2.0.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dccd-2.0.1.tar.gz
Algorithm Hash digest
SHA256 394d7756767e59188a381ad6418713a18d5c216a6eaf95e89bea7121b986d5e7
MD5 4b21af1c6f94274335525e509f8bfab2
BLAKE2b-256 4e4da990511427dfead5afaef4dd42efc3267ac283b4b2915eee89daf1933bd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dccd-2.0.1.tar.gz:

Publisher: release.yml on ArthurBernard/Download_Crypto_Currencies_Data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dccd-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: dccd-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 47.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dccd-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16c12c75f6cc793dadec9cf7e5e2c673235317e176d636cd4e3027161d5cff9e
MD5 f98080ffe81fb0ac143a78e6639bc0b8
BLAKE2b-256 8ba8cb80684d514c0f829c1251fce36c09dff625ae2d36f47ddeb02d2b287d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dccd-2.0.1-py3-none-any.whl:

Publisher: release.yml on ArthurBernard/Download_Crypto_Currencies_Data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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