Download Crypto Currency Data from different exchanges.
Project description
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()
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dccd-2.0.2.tar.gz.
File metadata
- Download URL: dccd-2.0.2.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
666bbb8bde12410f2a48d7565ba37df1325e04e129d1abfa4081875f07c3f0c2
|
|
| MD5 |
5eeb29f07f68b280b8f254d1a3ac69b4
|
|
| BLAKE2b-256 |
0ae0d7e8863293a0e535bcb48fb57c711647fc465f8f49455c588d67fd2acbe8
|
Provenance
The following attestation bundles were made for dccd-2.0.2.tar.gz:
Publisher:
release.yml on ArthurBernard/Download_Crypto_Currencies_Data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dccd-2.0.2.tar.gz -
Subject digest:
666bbb8bde12410f2a48d7565ba37df1325e04e129d1abfa4081875f07c3f0c2 - Sigstore transparency entry: 1541820096
- Sigstore integration time:
-
Permalink:
ArthurBernard/Download_Crypto_Currencies_Data@5fa0bfab4425da3f598089aaaa3062ab18e48784 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5fa0bfab4425da3f598089aaaa3062ab18e48784 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dccd-2.0.2-py3-none-any.whl.
File metadata
- Download URL: dccd-2.0.2-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06d4483bfab417ddf8c3f01fe0d58440193b213344978507b595b7df23e18096
|
|
| MD5 |
b3882680f62a054db4a50ec31a1773ff
|
|
| BLAKE2b-256 |
a038eeb1f394f6ce20540e0444a496e2f1bccb8ace20bef532b13749e5c01ccd
|
Provenance
The following attestation bundles were made for dccd-2.0.2-py3-none-any.whl:
Publisher:
release.yml on ArthurBernard/Download_Crypto_Currencies_Data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dccd-2.0.2-py3-none-any.whl -
Subject digest:
06d4483bfab417ddf8c3f01fe0d58440193b213344978507b595b7df23e18096 - Sigstore transparency entry: 1541820176
- Sigstore integration time:
-
Permalink:
ArthurBernard/Download_Crypto_Currencies_Data@5fa0bfab4425da3f598089aaaa3062ab18e48784 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5fa0bfab4425da3f598089aaaa3062ab18e48784 -
Trigger Event:
push
-
Statement type: