dccd 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dccd-2.0.0 → dccd-2.0.2}/CHANGELOG.md +17 -0
- dccd-2.0.2/PKG-INFO +182 -0
- dccd-2.0.2/README.rst +132 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/__init__.py +2 -2
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/binance.py +1 -1
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/coinbase.py +1 -1
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/kraken.py +1 -1
- dccd-2.0.2/dccd.egg-info/PKG-INFO +182 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd.egg-info/SOURCES.txt +0 -1
- {dccd-2.0.0 → dccd-2.0.2}/pyproject.toml +3 -1
- dccd-2.0.0/PKG-INFO +0 -147
- dccd-2.0.0/README.md +0 -79
- dccd-2.0.0/README.rst +0 -99
- dccd-2.0.0/dccd.egg-info/PKG-INFO +0 -147
- {dccd-2.0.0 → dccd-2.0.2}/CONTRIBUTING.md +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/LICENSE.txt +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/MANIFEST.in +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/continuous_dl/__init__.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/continuous_dl/bitfinex.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/continuous_dl/bitmex.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/continuous_dl/bybit.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/continuous_dl/exchange.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/__init__.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/bybit.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/exchange.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/histo_dl/okx.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/models.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/process_data.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/__init__.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/conftest.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_binance.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_bybit.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_coinbase.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_date_time.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_io.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_kraken.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_models.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_okx.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tests/test_process_data.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tools/__init__.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tools/date_time.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tools/io.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd/tools/websocket.py +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd.egg-info/dependency_links.txt +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd.egg-info/requires.txt +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/dccd.egg-info/top_level.txt +0 -0
- {dccd-2.0.0 → dccd-2.0.2}/setup.cfg +0 -0
|
@@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.0.2] - 2026-05-15
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `README.rst` — added PyPI status, docstring coverage, and downloads badges
|
|
14
|
+
|
|
15
|
+
## [2.0.1] - 2026-05-14
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Docstrings `See Also` updated in `FromBinance`, `FromKraken`, `FromCoinbase` — replaced defunct `FromGDax`/`FromPoloniex` with `FromBybit`/`FromOKX`
|
|
20
|
+
- `doc/source/index.rst` — exchange lists updated (Bybit, OKX added); all exchange RST pages added to toctree (previously orphaned)
|
|
21
|
+
- `dccd/__init__.py` module docstring — exchange list updated
|
|
22
|
+
- `pyproject.toml` — added `Documentation` and `Changelog` project URLs
|
|
23
|
+
- `README.rst` — added exchange support table, output format section, multi-exchange Quick start examples
|
|
24
|
+
- `examples/historical_downloader.py` — rewritten with modern API (Binance + Parquet)
|
|
25
|
+
|
|
9
26
|
## [2.0.0] - 2026-05-14
|
|
10
27
|
|
|
11
28
|
### Added
|
dccd-2.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dccd
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: Download Crypto Currency Data from different exchanges.
|
|
5
|
+
Author-email: Arthur Bernard <arthur.bernard.92@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
8
|
+
Project-URL: Documentation, https://download-crypto-currencies-data.readthedocs.io/
|
|
9
|
+
Project-URL: Changelog, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Database
|
|
20
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/x-rst
|
|
23
|
+
License-File: LICENSE.txt
|
|
24
|
+
Requires-Dist: numpy>=1.26
|
|
25
|
+
Requires-Dist: pandas>=2.0
|
|
26
|
+
Requires-Dist: requests>=2.28
|
|
27
|
+
Requires-Dist: openpyxl>=3.1
|
|
28
|
+
Requires-Dist: websockets>=12.0
|
|
29
|
+
Requires-Dist: scipy>=1.10
|
|
30
|
+
Requires-Dist: SQLAlchemy>=2.0
|
|
31
|
+
Requires-Dist: tenacity>=8.0
|
|
32
|
+
Requires-Dist: pydantic>=2.0
|
|
33
|
+
Provides-Extra: io
|
|
34
|
+
Requires-Dist: pyarrow>=13; extra == "io"
|
|
35
|
+
Requires-Dist: polars>=0.20; extra == "io"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
39
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
40
|
+
Requires-Dist: interrogate>=1.5; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pandas-stubs>=2.0; extra == "dev"
|
|
43
|
+
Provides-Extra: doc
|
|
44
|
+
Requires-Dist: sphinx>=7.0; extra == "doc"
|
|
45
|
+
Requires-Dist: furo; extra == "doc"
|
|
46
|
+
Requires-Dist: numpydoc; extra == "doc"
|
|
47
|
+
Requires-Dist: sphinx-design; extra == "doc"
|
|
48
|
+
Requires-Dist: sphinx-copybutton; extra == "doc"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
=============================
|
|
52
|
+
Download Crypto-Currency Data
|
|
53
|
+
=============================
|
|
54
|
+
|
|
55
|
+
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
56
|
+
:alt: PyPI - Python Version
|
|
57
|
+
|
|
58
|
+
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
59
|
+
:target: https://pypi.org/project/dccd/
|
|
60
|
+
:alt: PyPI
|
|
61
|
+
|
|
62
|
+
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
63
|
+
:target: https://pypi.org/project/dccd/
|
|
64
|
+
:alt: PyPI - Status
|
|
65
|
+
|
|
66
|
+
.. image:: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml/badge.svg
|
|
67
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml
|
|
68
|
+
:alt: CI
|
|
69
|
+
|
|
70
|
+
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
71
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
72
|
+
:alt: License
|
|
73
|
+
|
|
74
|
+
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
75
|
+
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/
|
|
76
|
+
:alt: Documentation Status
|
|
77
|
+
|
|
78
|
+
.. image:: https://raw.githubusercontent.com/ArthurBernard/Download_Crypto_Currencies_Data/master/interrogate_badge_output.svg
|
|
79
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
80
|
+
:alt: Docstring Coverage
|
|
81
|
+
|
|
82
|
+
.. image:: https://pepy.tech/badge/dccd
|
|
83
|
+
:target: https://pepy.tech/project/dccd
|
|
84
|
+
:alt: Downloads
|
|
85
|
+
|
|
86
|
+
Python package to download crypto-currency data (OHLCV, trades, order book) from multiple
|
|
87
|
+
exchanges via REST and WebSocket APIs. Data can be saved to CSV, Excel, SQLite, PostgreSQL,
|
|
88
|
+
or Parquet.
|
|
89
|
+
|
|
90
|
+
Installation
|
|
91
|
+
============
|
|
92
|
+
|
|
93
|
+
From pip::
|
|
94
|
+
|
|
95
|
+
$ pip install dccd
|
|
96
|
+
|
|
97
|
+
With optional Parquet / Polars support::
|
|
98
|
+
|
|
99
|
+
$ pip install "dccd[io]"
|
|
100
|
+
|
|
101
|
+
From source::
|
|
102
|
+
|
|
103
|
+
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
104
|
+
$ cd Download_Crypto_Currencies_Data
|
|
105
|
+
$ pip install -e .
|
|
106
|
+
|
|
107
|
+
Supported exchanges
|
|
108
|
+
===================
|
|
109
|
+
|
|
110
|
+
+------------------+------------+-----------------+
|
|
111
|
+
| Exchange | Historical | Real-time |
|
|
112
|
+
+==================+============+=================+
|
|
113
|
+
| Binance | ✓ | |
|
|
114
|
+
+------------------+------------+-----------------+
|
|
115
|
+
| Coinbase | ✓ | |
|
|
116
|
+
+------------------+------------+-----------------+
|
|
117
|
+
| Kraken | ✓ | |
|
|
118
|
+
+------------------+------------+-----------------+
|
|
119
|
+
| Bybit | ✓ | ✓ |
|
|
120
|
+
+------------------+------------+-----------------+
|
|
121
|
+
| OKX | ✓ | |
|
|
122
|
+
+------------------+------------+-----------------+
|
|
123
|
+
| Bitfinex | | ✓ |
|
|
124
|
+
+------------------+------------+-----------------+
|
|
125
|
+
| Bitmex | | ✓ |
|
|
126
|
+
+------------------+------------+-----------------+
|
|
127
|
+
|
|
128
|
+
Presentation
|
|
129
|
+
============
|
|
130
|
+
|
|
131
|
+
**Historical Downloader** ``dccd.histo_dl``
|
|
132
|
+
Download OHLCV data via REST APIs and save to disk. Supports chunked
|
|
133
|
+
requests, automatic retry on rate-limit (HTTP 429), and incremental
|
|
134
|
+
updates from the last saved timestamp.
|
|
135
|
+
|
|
136
|
+
**Continuous Downloader** ``dccd.continuous_dl``
|
|
137
|
+
Stream real-time data (order book, trades) via WebSocket with automatic
|
|
138
|
+
reconnection and configurable processing/saving callbacks.
|
|
139
|
+
|
|
140
|
+
Output formats
|
|
141
|
+
--------------
|
|
142
|
+
|
|
143
|
+
Historical data can be saved as **CSV**, **Excel** (``.xlsx``), **SQLite**,
|
|
144
|
+
**PostgreSQL** (via SQLAlchemy), or **Parquet** (requires ``dccd[io]``).
|
|
145
|
+
Parquet files can be read back as either a ``pandas.DataFrame`` or a
|
|
146
|
+
``polars.DataFrame``.
|
|
147
|
+
|
|
148
|
+
Quick start
|
|
149
|
+
===========
|
|
150
|
+
|
|
151
|
+
Historical data (pandas)::
|
|
152
|
+
|
|
153
|
+
from dccd.histo_dl import FromBinance
|
|
154
|
+
|
|
155
|
+
obj = FromBinance('/path/to/data/', 'BTC', 3600, fiat='USDT')
|
|
156
|
+
obj.import_data(start='2024-01-01 00:00:00', end='2024-12-31 00:00:00')
|
|
157
|
+
obj.save(form='parquet')
|
|
158
|
+
df = obj.get_data() # pandas DataFrame
|
|
159
|
+
|
|
160
|
+
Polars output::
|
|
161
|
+
|
|
162
|
+
df_pl = obj.get_data(format='polars')
|
|
163
|
+
|
|
164
|
+
Incremental update (resume from last saved point)::
|
|
165
|
+
|
|
166
|
+
obj.import_data(start='last', end='now').save(form='parquet')
|
|
167
|
+
|
|
168
|
+
Other exchanges::
|
|
169
|
+
|
|
170
|
+
from dccd.histo_dl import FromKraken, FromBybit, FromOKX
|
|
171
|
+
|
|
172
|
+
FromKraken('/path/', 'ETH', 3600).import_data(start='2024-01-01', end='now').save()
|
|
173
|
+
FromBybit('/path/', 'BTC', 86400).import_data(start='2024-01-01', end='now').save()
|
|
174
|
+
FromOKX('/path/', 'BTC', 3600).import_data(start='2024-01-01', end='now').save()
|
|
175
|
+
|
|
176
|
+
Links
|
|
177
|
+
=====
|
|
178
|
+
|
|
179
|
+
- PyPI: https://pypi.org/project/dccd/
|
|
180
|
+
- Documentation: https://download-crypto-currencies-data.readthedocs.io/
|
|
181
|
+
- Source: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
182
|
+
- Changelog: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md
|
dccd-2.0.2/README.rst
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
=============================
|
|
2
|
+
Download Crypto-Currency Data
|
|
3
|
+
=============================
|
|
4
|
+
|
|
5
|
+
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
6
|
+
:alt: PyPI - Python Version
|
|
7
|
+
|
|
8
|
+
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
9
|
+
:target: https://pypi.org/project/dccd/
|
|
10
|
+
:alt: PyPI
|
|
11
|
+
|
|
12
|
+
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
13
|
+
:target: https://pypi.org/project/dccd/
|
|
14
|
+
:alt: PyPI - Status
|
|
15
|
+
|
|
16
|
+
.. image:: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml/badge.svg
|
|
17
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml
|
|
18
|
+
:alt: CI
|
|
19
|
+
|
|
20
|
+
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
21
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
22
|
+
:alt: License
|
|
23
|
+
|
|
24
|
+
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
25
|
+
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/
|
|
26
|
+
:alt: Documentation Status
|
|
27
|
+
|
|
28
|
+
.. image:: https://raw.githubusercontent.com/ArthurBernard/Download_Crypto_Currencies_Data/master/interrogate_badge_output.svg
|
|
29
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
30
|
+
:alt: Docstring Coverage
|
|
31
|
+
|
|
32
|
+
.. image:: https://pepy.tech/badge/dccd
|
|
33
|
+
:target: https://pepy.tech/project/dccd
|
|
34
|
+
:alt: Downloads
|
|
35
|
+
|
|
36
|
+
Python package to download crypto-currency data (OHLCV, trades, order book) from multiple
|
|
37
|
+
exchanges via REST and WebSocket APIs. Data can be saved to CSV, Excel, SQLite, PostgreSQL,
|
|
38
|
+
or Parquet.
|
|
39
|
+
|
|
40
|
+
Installation
|
|
41
|
+
============
|
|
42
|
+
|
|
43
|
+
From pip::
|
|
44
|
+
|
|
45
|
+
$ pip install dccd
|
|
46
|
+
|
|
47
|
+
With optional Parquet / Polars support::
|
|
48
|
+
|
|
49
|
+
$ pip install "dccd[io]"
|
|
50
|
+
|
|
51
|
+
From source::
|
|
52
|
+
|
|
53
|
+
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
54
|
+
$ cd Download_Crypto_Currencies_Data
|
|
55
|
+
$ pip install -e .
|
|
56
|
+
|
|
57
|
+
Supported exchanges
|
|
58
|
+
===================
|
|
59
|
+
|
|
60
|
+
+------------------+------------+-----------------+
|
|
61
|
+
| Exchange | Historical | Real-time |
|
|
62
|
+
+==================+============+=================+
|
|
63
|
+
| Binance | ✓ | |
|
|
64
|
+
+------------------+------------+-----------------+
|
|
65
|
+
| Coinbase | ✓ | |
|
|
66
|
+
+------------------+------------+-----------------+
|
|
67
|
+
| Kraken | ✓ | |
|
|
68
|
+
+------------------+------------+-----------------+
|
|
69
|
+
| Bybit | ✓ | ✓ |
|
|
70
|
+
+------------------+------------+-----------------+
|
|
71
|
+
| OKX | ✓ | |
|
|
72
|
+
+------------------+------------+-----------------+
|
|
73
|
+
| Bitfinex | | ✓ |
|
|
74
|
+
+------------------+------------+-----------------+
|
|
75
|
+
| Bitmex | | ✓ |
|
|
76
|
+
+------------------+------------+-----------------+
|
|
77
|
+
|
|
78
|
+
Presentation
|
|
79
|
+
============
|
|
80
|
+
|
|
81
|
+
**Historical Downloader** ``dccd.histo_dl``
|
|
82
|
+
Download OHLCV data via REST APIs and save to disk. Supports chunked
|
|
83
|
+
requests, automatic retry on rate-limit (HTTP 429), and incremental
|
|
84
|
+
updates from the last saved timestamp.
|
|
85
|
+
|
|
86
|
+
**Continuous Downloader** ``dccd.continuous_dl``
|
|
87
|
+
Stream real-time data (order book, trades) via WebSocket with automatic
|
|
88
|
+
reconnection and configurable processing/saving callbacks.
|
|
89
|
+
|
|
90
|
+
Output formats
|
|
91
|
+
--------------
|
|
92
|
+
|
|
93
|
+
Historical data can be saved as **CSV**, **Excel** (``.xlsx``), **SQLite**,
|
|
94
|
+
**PostgreSQL** (via SQLAlchemy), or **Parquet** (requires ``dccd[io]``).
|
|
95
|
+
Parquet files can be read back as either a ``pandas.DataFrame`` or a
|
|
96
|
+
``polars.DataFrame``.
|
|
97
|
+
|
|
98
|
+
Quick start
|
|
99
|
+
===========
|
|
100
|
+
|
|
101
|
+
Historical data (pandas)::
|
|
102
|
+
|
|
103
|
+
from dccd.histo_dl import FromBinance
|
|
104
|
+
|
|
105
|
+
obj = FromBinance('/path/to/data/', 'BTC', 3600, fiat='USDT')
|
|
106
|
+
obj.import_data(start='2024-01-01 00:00:00', end='2024-12-31 00:00:00')
|
|
107
|
+
obj.save(form='parquet')
|
|
108
|
+
df = obj.get_data() # pandas DataFrame
|
|
109
|
+
|
|
110
|
+
Polars output::
|
|
111
|
+
|
|
112
|
+
df_pl = obj.get_data(format='polars')
|
|
113
|
+
|
|
114
|
+
Incremental update (resume from last saved point)::
|
|
115
|
+
|
|
116
|
+
obj.import_data(start='last', end='now').save(form='parquet')
|
|
117
|
+
|
|
118
|
+
Other exchanges::
|
|
119
|
+
|
|
120
|
+
from dccd.histo_dl import FromKraken, FromBybit, FromOKX
|
|
121
|
+
|
|
122
|
+
FromKraken('/path/', 'ETH', 3600).import_data(start='2024-01-01', end='now').save()
|
|
123
|
+
FromBybit('/path/', 'BTC', 86400).import_data(start='2024-01-01', end='now').save()
|
|
124
|
+
FromOKX('/path/', 'BTC', 3600).import_data(start='2024-01-01', end='now').save()
|
|
125
|
+
|
|
126
|
+
Links
|
|
127
|
+
=====
|
|
128
|
+
|
|
129
|
+
- PyPI: https://pypi.org/project/dccd/
|
|
130
|
+
- Documentation: https://download-crypto-currencies-data.readthedocs.io/
|
|
131
|
+
- Source: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
132
|
+
- Changelog: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
""" This is `dccd` package.
|
|
10
10
|
|
|
11
11
|
It allows you to download data (prices, volumes, trades, orderbooks, etc.)
|
|
12
|
-
from crypto-currency exchanges (
|
|
13
|
-
|
|
12
|
+
from crypto-currency exchanges (Binance, Coinbase, Kraken, Bybit, OKX for
|
|
13
|
+
historical data; Bitfinex, Bitmex, Bybit for real-time streaming).
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dccd
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: Download Crypto Currency Data from different exchanges.
|
|
5
|
+
Author-email: Arthur Bernard <arthur.bernard.92@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
8
|
+
Project-URL: Documentation, https://download-crypto-currencies-data.readthedocs.io/
|
|
9
|
+
Project-URL: Changelog, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Database
|
|
20
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/x-rst
|
|
23
|
+
License-File: LICENSE.txt
|
|
24
|
+
Requires-Dist: numpy>=1.26
|
|
25
|
+
Requires-Dist: pandas>=2.0
|
|
26
|
+
Requires-Dist: requests>=2.28
|
|
27
|
+
Requires-Dist: openpyxl>=3.1
|
|
28
|
+
Requires-Dist: websockets>=12.0
|
|
29
|
+
Requires-Dist: scipy>=1.10
|
|
30
|
+
Requires-Dist: SQLAlchemy>=2.0
|
|
31
|
+
Requires-Dist: tenacity>=8.0
|
|
32
|
+
Requires-Dist: pydantic>=2.0
|
|
33
|
+
Provides-Extra: io
|
|
34
|
+
Requires-Dist: pyarrow>=13; extra == "io"
|
|
35
|
+
Requires-Dist: polars>=0.20; extra == "io"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
39
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
40
|
+
Requires-Dist: interrogate>=1.5; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pandas-stubs>=2.0; extra == "dev"
|
|
43
|
+
Provides-Extra: doc
|
|
44
|
+
Requires-Dist: sphinx>=7.0; extra == "doc"
|
|
45
|
+
Requires-Dist: furo; extra == "doc"
|
|
46
|
+
Requires-Dist: numpydoc; extra == "doc"
|
|
47
|
+
Requires-Dist: sphinx-design; extra == "doc"
|
|
48
|
+
Requires-Dist: sphinx-copybutton; extra == "doc"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
=============================
|
|
52
|
+
Download Crypto-Currency Data
|
|
53
|
+
=============================
|
|
54
|
+
|
|
55
|
+
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
56
|
+
:alt: PyPI - Python Version
|
|
57
|
+
|
|
58
|
+
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
59
|
+
:target: https://pypi.org/project/dccd/
|
|
60
|
+
:alt: PyPI
|
|
61
|
+
|
|
62
|
+
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
63
|
+
:target: https://pypi.org/project/dccd/
|
|
64
|
+
:alt: PyPI - Status
|
|
65
|
+
|
|
66
|
+
.. image:: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml/badge.svg
|
|
67
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/actions/workflows/ci.yml
|
|
68
|
+
:alt: CI
|
|
69
|
+
|
|
70
|
+
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
71
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
72
|
+
:alt: License
|
|
73
|
+
|
|
74
|
+
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
75
|
+
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/
|
|
76
|
+
:alt: Documentation Status
|
|
77
|
+
|
|
78
|
+
.. image:: https://raw.githubusercontent.com/ArthurBernard/Download_Crypto_Currencies_Data/master/interrogate_badge_output.svg
|
|
79
|
+
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
80
|
+
:alt: Docstring Coverage
|
|
81
|
+
|
|
82
|
+
.. image:: https://pepy.tech/badge/dccd
|
|
83
|
+
:target: https://pepy.tech/project/dccd
|
|
84
|
+
:alt: Downloads
|
|
85
|
+
|
|
86
|
+
Python package to download crypto-currency data (OHLCV, trades, order book) from multiple
|
|
87
|
+
exchanges via REST and WebSocket APIs. Data can be saved to CSV, Excel, SQLite, PostgreSQL,
|
|
88
|
+
or Parquet.
|
|
89
|
+
|
|
90
|
+
Installation
|
|
91
|
+
============
|
|
92
|
+
|
|
93
|
+
From pip::
|
|
94
|
+
|
|
95
|
+
$ pip install dccd
|
|
96
|
+
|
|
97
|
+
With optional Parquet / Polars support::
|
|
98
|
+
|
|
99
|
+
$ pip install "dccd[io]"
|
|
100
|
+
|
|
101
|
+
From source::
|
|
102
|
+
|
|
103
|
+
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
104
|
+
$ cd Download_Crypto_Currencies_Data
|
|
105
|
+
$ pip install -e .
|
|
106
|
+
|
|
107
|
+
Supported exchanges
|
|
108
|
+
===================
|
|
109
|
+
|
|
110
|
+
+------------------+------------+-----------------+
|
|
111
|
+
| Exchange | Historical | Real-time |
|
|
112
|
+
+==================+============+=================+
|
|
113
|
+
| Binance | ✓ | |
|
|
114
|
+
+------------------+------------+-----------------+
|
|
115
|
+
| Coinbase | ✓ | |
|
|
116
|
+
+------------------+------------+-----------------+
|
|
117
|
+
| Kraken | ✓ | |
|
|
118
|
+
+------------------+------------+-----------------+
|
|
119
|
+
| Bybit | ✓ | ✓ |
|
|
120
|
+
+------------------+------------+-----------------+
|
|
121
|
+
| OKX | ✓ | |
|
|
122
|
+
+------------------+------------+-----------------+
|
|
123
|
+
| Bitfinex | | ✓ |
|
|
124
|
+
+------------------+------------+-----------------+
|
|
125
|
+
| Bitmex | | ✓ |
|
|
126
|
+
+------------------+------------+-----------------+
|
|
127
|
+
|
|
128
|
+
Presentation
|
|
129
|
+
============
|
|
130
|
+
|
|
131
|
+
**Historical Downloader** ``dccd.histo_dl``
|
|
132
|
+
Download OHLCV data via REST APIs and save to disk. Supports chunked
|
|
133
|
+
requests, automatic retry on rate-limit (HTTP 429), and incremental
|
|
134
|
+
updates from the last saved timestamp.
|
|
135
|
+
|
|
136
|
+
**Continuous Downloader** ``dccd.continuous_dl``
|
|
137
|
+
Stream real-time data (order book, trades) via WebSocket with automatic
|
|
138
|
+
reconnection and configurable processing/saving callbacks.
|
|
139
|
+
|
|
140
|
+
Output formats
|
|
141
|
+
--------------
|
|
142
|
+
|
|
143
|
+
Historical data can be saved as **CSV**, **Excel** (``.xlsx``), **SQLite**,
|
|
144
|
+
**PostgreSQL** (via SQLAlchemy), or **Parquet** (requires ``dccd[io]``).
|
|
145
|
+
Parquet files can be read back as either a ``pandas.DataFrame`` or a
|
|
146
|
+
``polars.DataFrame``.
|
|
147
|
+
|
|
148
|
+
Quick start
|
|
149
|
+
===========
|
|
150
|
+
|
|
151
|
+
Historical data (pandas)::
|
|
152
|
+
|
|
153
|
+
from dccd.histo_dl import FromBinance
|
|
154
|
+
|
|
155
|
+
obj = FromBinance('/path/to/data/', 'BTC', 3600, fiat='USDT')
|
|
156
|
+
obj.import_data(start='2024-01-01 00:00:00', end='2024-12-31 00:00:00')
|
|
157
|
+
obj.save(form='parquet')
|
|
158
|
+
df = obj.get_data() # pandas DataFrame
|
|
159
|
+
|
|
160
|
+
Polars output::
|
|
161
|
+
|
|
162
|
+
df_pl = obj.get_data(format='polars')
|
|
163
|
+
|
|
164
|
+
Incremental update (resume from last saved point)::
|
|
165
|
+
|
|
166
|
+
obj.import_data(start='last', end='now').save(form='parquet')
|
|
167
|
+
|
|
168
|
+
Other exchanges::
|
|
169
|
+
|
|
170
|
+
from dccd.histo_dl import FromKraken, FromBybit, FromOKX
|
|
171
|
+
|
|
172
|
+
FromKraken('/path/', 'ETH', 3600).import_data(start='2024-01-01', end='now').save()
|
|
173
|
+
FromBybit('/path/', 'BTC', 86400).import_data(start='2024-01-01', end='now').save()
|
|
174
|
+
FromOKX('/path/', 'BTC', 3600).import_data(start='2024-01-01', end='now').save()
|
|
175
|
+
|
|
176
|
+
Links
|
|
177
|
+
=====
|
|
178
|
+
|
|
179
|
+
- PyPI: https://pypi.org/project/dccd/
|
|
180
|
+
- Documentation: https://download-crypto-currencies-data.readthedocs.io/
|
|
181
|
+
- Source: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
182
|
+
- Changelog: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dccd"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.2"
|
|
8
8
|
description = "Download Crypto Currency Data from different exchanges."
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -42,6 +42,8 @@ doc = ["sphinx>=7.0", "furo", "numpydoc", "sphinx-design", "sphinx-copybutton"]
|
|
|
42
42
|
|
|
43
43
|
[project.urls]
|
|
44
44
|
Homepage = "https://github.com/ArthurBernard/Download_Crypto_Currencies_Data"
|
|
45
|
+
Documentation = "https://download-crypto-currencies-data.readthedocs.io/"
|
|
46
|
+
Changelog = "https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/CHANGELOG.md"
|
|
45
47
|
|
|
46
48
|
[tool.setuptools.packages.find]
|
|
47
49
|
include = ["dccd*"]
|
dccd-2.0.0/PKG-INFO
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dccd
|
|
3
|
-
Version: 2.0.0
|
|
4
|
-
Summary: Download Crypto Currency Data from different exchanges.
|
|
5
|
-
Author-email: Arthur Bernard <arthur.bernard.92@gmail.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
8
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Classifier: Topic :: Database
|
|
18
|
-
Classifier: Topic :: Office/Business :: Financial
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Description-Content-Type: text/x-rst
|
|
21
|
-
License-File: LICENSE.txt
|
|
22
|
-
Requires-Dist: numpy>=1.26
|
|
23
|
-
Requires-Dist: pandas>=2.0
|
|
24
|
-
Requires-Dist: requests>=2.28
|
|
25
|
-
Requires-Dist: openpyxl>=3.1
|
|
26
|
-
Requires-Dist: websockets>=12.0
|
|
27
|
-
Requires-Dist: scipy>=1.10
|
|
28
|
-
Requires-Dist: SQLAlchemy>=2.0
|
|
29
|
-
Requires-Dist: tenacity>=8.0
|
|
30
|
-
Requires-Dist: pydantic>=2.0
|
|
31
|
-
Provides-Extra: io
|
|
32
|
-
Requires-Dist: pyarrow>=13; extra == "io"
|
|
33
|
-
Requires-Dist: polars>=0.20; extra == "io"
|
|
34
|
-
Provides-Extra: dev
|
|
35
|
-
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
36
|
-
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
37
|
-
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
38
|
-
Requires-Dist: interrogate>=1.5; extra == "dev"
|
|
39
|
-
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
40
|
-
Requires-Dist: pandas-stubs>=2.0; extra == "dev"
|
|
41
|
-
Provides-Extra: doc
|
|
42
|
-
Requires-Dist: sphinx>=7.0; extra == "doc"
|
|
43
|
-
Requires-Dist: furo; extra == "doc"
|
|
44
|
-
Requires-Dist: numpydoc; extra == "doc"
|
|
45
|
-
Requires-Dist: sphinx-design; extra == "doc"
|
|
46
|
-
Requires-Dist: sphinx-copybutton; extra == "doc"
|
|
47
|
-
Dynamic: license-file
|
|
48
|
-
|
|
49
|
-
=============================
|
|
50
|
-
Download Crypto-Currency Data
|
|
51
|
-
=============================
|
|
52
|
-
|
|
53
|
-
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
54
|
-
:alt: PyPI - Python Version
|
|
55
|
-
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
56
|
-
:target: https://pypi.org/project/dccd/
|
|
57
|
-
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
58
|
-
:target: https://pypi.org/project/dccd/
|
|
59
|
-
.. image:: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data.svg?branch=master
|
|
60
|
-
:target: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data
|
|
61
|
-
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
62
|
-
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
63
|
-
.. image:: https://pepy.tech/badge/dccd
|
|
64
|
-
:target: https://pepy.tech/project/dccd
|
|
65
|
-
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
66
|
-
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/?badge=latest
|
|
67
|
-
:alt: Documentation Status
|
|
68
|
-
.. image:: https://img.shields.io/lgtm/grade/python/g/ArthurBernard/Download_Crypto_Currencies_Data.svg?logo=lgtm&logoWidth=18
|
|
69
|
-
:target: https://lgtm.com/projects/g/ArthurBernard/Download_Crypto_Currencies_Data/context:python)
|
|
70
|
-
:alt: Language grade: Python
|
|
71
|
-
|
|
72
|
-
This is the starting point of a python package [*]_ to automatically *download* data and *update* database with *crypto-currency* data (bitcoin, ether, litecoin, etc.) from different API exchanges (allow only Binance, Bitmex, Bitfinex, GDAX, Kraken and Poloniex for the moment).
|
|
73
|
-
|
|
74
|
-
Presentation:
|
|
75
|
-
=============
|
|
76
|
-
|
|
77
|
-
The ``dccd`` package allow you two main methods to download data. The first one is recommended to download data at high frequency (**minutely** or **tick by tick**), and the second one is recommended to download data at a lower frequency (**hourly** or **daily**):
|
|
78
|
-
|
|
79
|
-
- **Continuous Downloader** ``dccd.continuous_dl``:
|
|
80
|
-
Download and update continuously data (orderbook, trades tick by tick, ohlc, etc) and save it in a database. *Currently only support Bitfinex and Bitmex exchanges*.
|
|
81
|
-
|
|
82
|
-
- **Historical Downloader** ``dccd.histo_dl``:
|
|
83
|
-
Download historical data (ohlc, trades, etc.) and save it. *Currently only support Binance, GDax, Kraken and Poloniex exchanges*.
|
|
84
|
-
|
|
85
|
-
Historical Downloader:
|
|
86
|
-
----------------------
|
|
87
|
-
|
|
88
|
-
The **'dccd.histo_dl'** module contains a main class and four classes to download and update data for each exchange, and a module **'date_time'** to manage specific time format needed for each API.
|
|
89
|
-
|
|
90
|
-
The four classes to download historical data are **FromBinance**, **FromGDax**, **FromKraken** and **FromPoloniex**. All have the same methods and almost the same parameters:
|
|
91
|
-
|
|
92
|
-
- **__init__(path, crypto, span, fiat(optional), form(optional))** initialisation with **path** is the path where save the data (string), **crypto** is a crypto currency (string) and **span** is the interval time between each observation in seconds (integer) or can be a string as 'hourly', 'daily', etc. (see details on the doc string). The optional parameters are **fiat** the second currency (default is 'USD' and 'USDT' for poloniex and binance) and **form** the format to save the data (default is 'xlsx').
|
|
93
|
-
|
|
94
|
-
- **import\_data(start, end)** download data with **start** and **end** the timestamp (integer) or the date and time (string as 'yyyy-mm-dd hh\:mm\:ss'), respectively of the first observation and the last observation (default are special parameters **start='last'** allow the last data saved and **end='now'** allow the last observation available). Exclusion: Kraken don't allow the **end** parameter and provide only the thousand last observations.
|
|
95
|
-
|
|
96
|
-
- **save(form(optional), by(optional))** save the data with **form** the format of the saved data (default is 'xlsx') and **by** is the "size" of each saved file (default is 'Y' as an entire year). Exclusion: This optional parameters are in progress, let the default parameter for the moment, other are not allow.
|
|
97
|
-
|
|
98
|
-
- **get\_data()** returns the data frame without any parameter.
|
|
99
|
-
|
|
100
|
-
Method chaining is available.
|
|
101
|
-
|
|
102
|
-
Installation:
|
|
103
|
-
=============
|
|
104
|
-
|
|
105
|
-
Install the library from pip:
|
|
106
|
-
-----------------------------
|
|
107
|
-
|
|
108
|
-
$ pip install dccd
|
|
109
|
-
|
|
110
|
-
Install the library from source:
|
|
111
|
-
--------------------------------
|
|
112
|
-
|
|
113
|
-
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
114
|
-
|
|
115
|
-
$ cd Download_Crypto_Currencies_Data
|
|
116
|
-
|
|
117
|
-
$ python setup.py install --user
|
|
118
|
-
|
|
119
|
-
Requirements:
|
|
120
|
-
=============
|
|
121
|
-
|
|
122
|
-
- numpy>=1.14.1
|
|
123
|
-
- pandas>=0.22.0
|
|
124
|
-
- requests>=2.18.4
|
|
125
|
-
- xlrd>=1.1.0
|
|
126
|
-
- xlsxwriter>=1.0.2
|
|
127
|
-
- websockets>=7.0.0
|
|
128
|
-
- scipy>=1.2.0
|
|
129
|
-
- SQLAlchemy>=1.3.0
|
|
130
|
-
|
|
131
|
-
Supported exchanges:
|
|
132
|
-
====================
|
|
133
|
-
|
|
134
|
-
- **Binance.**
|
|
135
|
-
|
|
136
|
-
- **Bitfinex.**
|
|
137
|
-
|
|
138
|
-
- **Bitmex.**
|
|
139
|
-
|
|
140
|
-
- **GDAX.**
|
|
141
|
-
|
|
142
|
-
- **Kraken.**
|
|
143
|
-
|
|
144
|
-
- **Poloniex.**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
.. [*] Package not achieved, always in progress. This is my first one package, all advice is welcome.
|
dccd-2.0.0/README.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Download Crypto-Currency Data
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
[](https://pypi.org/project/dccd/)
|
|
5
|
-
[](https://pypi.org/project/dccd/)
|
|
6
|
-
[](https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data)
|
|
7
|
-
[](https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt)
|
|
8
|
-
[](https://pepy.tech/project/dccd)
|
|
9
|
-
[](https://download-crypto-currencies-data.readthedocs.io/en/latest/?badge=latest)
|
|
10
|
-
[](https://lgtm.com/projects/g/ArthurBernard/Download_Crypto_Currencies_Data/context:python)
|
|
11
|
-
|
|
12
|
-
#### This is the starting point of a python package to automatically *download* data and *update* database with *crypto-currency* data (bitcoin, ether, litecoin, etc.) from different API exchanges (allow only Binance, Bitmex, Bitfinex, GDAX, Kraken and Poloniex for the moment).
|
|
13
|
-
|
|
14
|
-
## Presentation:
|
|
15
|
-
|
|
16
|
-
The ``dccd`` package allow you two main methods to download data. The first one is recommended to download data at high frequency (**minutely** or **tick by tick**), and the second one is recommended to download data at a lower frequency (**hourly** or **daily**):
|
|
17
|
-
|
|
18
|
-
- **Continuous Downloader `dccd.continuous_dl`**:
|
|
19
|
-
Download and update continuously data (orderbook, trades tick by tick, ohlc, etc) and save it in a database. *Currently only support Bitfinex and Bitmex exchanges*.
|
|
20
|
-
|
|
21
|
-
- **Historical Downloader `dccd.histo_dl`**:
|
|
22
|
-
Download historical data (ohlc, trades, etc.) and save it. *Currently only support Binance, GDax, Kraken and Poloniex exchanges*.
|
|
23
|
-
|
|
24
|
-
### Historical Downloader:
|
|
25
|
-
|
|
26
|
-
The **'dccd.histo_dl'** module contains a main class and four classes to download and update data for each exchange, and a module **'date_time'** to manage specific time format needed for each API.
|
|
27
|
-
|
|
28
|
-
The four classes to download historical data are **FromBinance**, **FromGDax**, **FromKraken** and **FromPoloniex**. All have the same methods and almost the same parameters:
|
|
29
|
-
|
|
30
|
-
- **\_\_init\_\_(path, crypto, span, fiat(optional), form(optional))** initialisation with **path** is the path where save the data (string), **crypto** is a crypto currency (string) and **span** is the interval time between each observation in seconds (integer) or can be a string as 'hourly', 'daily', etc. (see details on the doc string). The optional parameters are **fiat** the second currency (default is 'USD' and 'USDT' for poloniex and binance) and **form** the format to save the data (default is 'xlsx').
|
|
31
|
-
|
|
32
|
-
- **import\_data(start, end)** download data with **start** and **end** the timestamp (integer) or the date and time (string as 'yyyy-mm-dd hh:mm:ss'), respectively of the first observation and the last observation (default are special parameters **start='last'** allow the last data saved and **end='now'** allow the last observation available). Exclusion: Kraken don't allow the **end** parameter and provide only the thousand last observations.
|
|
33
|
-
|
|
34
|
-
- **save(form(optional), by(optional))** save the data with **form** the format of the saved data (default is 'xlsx') and **by** is the "size" of each saved file (default is 'Y' as an entire year). Exclusion: This optional parameters are in progress, let the default parameter for the moment, other are not allow.
|
|
35
|
-
|
|
36
|
-
- **get_data()** returns the data frame without any parameter.
|
|
37
|
-
|
|
38
|
-
Method chaining is available.
|
|
39
|
-
|
|
40
|
-
## Installation:
|
|
41
|
-
|
|
42
|
-
#### Install the library from pip:
|
|
43
|
-
|
|
44
|
-
> $ pip install dccd
|
|
45
|
-
|
|
46
|
-
#### Install the library from source:
|
|
47
|
-
|
|
48
|
-
> $ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
49
|
-
> $ cd Download_Crypto_Currencies_Data
|
|
50
|
-
> $ python setup.py install --user
|
|
51
|
-
|
|
52
|
-
## Requirements:
|
|
53
|
-
|
|
54
|
-
- numpy>=1.14.1
|
|
55
|
-
- pandas>=0.22.0
|
|
56
|
-
- requests>=2.18.4
|
|
57
|
-
- xlrd>=1.1.0
|
|
58
|
-
- xlsxwriter>=1.0.2
|
|
59
|
-
- websockets>=7.0.0
|
|
60
|
-
- scipy>=1.2.0
|
|
61
|
-
- SQLAlchemy>=1.3.0
|
|
62
|
-
|
|
63
|
-
## Supported exchanges:
|
|
64
|
-
|
|
65
|
-
- **Binance.**
|
|
66
|
-
|
|
67
|
-
- **Bitfinex.**
|
|
68
|
-
|
|
69
|
-
- **Bitmex.**
|
|
70
|
-
|
|
71
|
-
- **GDAX.**
|
|
72
|
-
|
|
73
|
-
- **Kraken.**
|
|
74
|
-
|
|
75
|
-
- **Poloniex.**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
***
|
|
79
|
-
*Package not achieved, always in progress. This is my first one package, all advice is welcome.*
|
dccd-2.0.0/README.rst
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
=============================
|
|
2
|
-
Download Crypto-Currency Data
|
|
3
|
-
=============================
|
|
4
|
-
|
|
5
|
-
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
6
|
-
:alt: PyPI - Python Version
|
|
7
|
-
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
8
|
-
:target: https://pypi.org/project/dccd/
|
|
9
|
-
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
10
|
-
:target: https://pypi.org/project/dccd/
|
|
11
|
-
.. image:: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data.svg?branch=master
|
|
12
|
-
:target: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data
|
|
13
|
-
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
14
|
-
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
15
|
-
.. image:: https://pepy.tech/badge/dccd
|
|
16
|
-
:target: https://pepy.tech/project/dccd
|
|
17
|
-
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
18
|
-
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/?badge=latest
|
|
19
|
-
:alt: Documentation Status
|
|
20
|
-
.. image:: https://img.shields.io/lgtm/grade/python/g/ArthurBernard/Download_Crypto_Currencies_Data.svg?logo=lgtm&logoWidth=18
|
|
21
|
-
:target: https://lgtm.com/projects/g/ArthurBernard/Download_Crypto_Currencies_Data/context:python)
|
|
22
|
-
:alt: Language grade: Python
|
|
23
|
-
|
|
24
|
-
This is the starting point of a python package [*]_ to automatically *download* data and *update* database with *crypto-currency* data (bitcoin, ether, litecoin, etc.) from different API exchanges (allow only Binance, Bitmex, Bitfinex, GDAX, Kraken and Poloniex for the moment).
|
|
25
|
-
|
|
26
|
-
Presentation:
|
|
27
|
-
=============
|
|
28
|
-
|
|
29
|
-
The ``dccd`` package allow you two main methods to download data. The first one is recommended to download data at high frequency (**minutely** or **tick by tick**), and the second one is recommended to download data at a lower frequency (**hourly** or **daily**):
|
|
30
|
-
|
|
31
|
-
- **Continuous Downloader** ``dccd.continuous_dl``:
|
|
32
|
-
Download and update continuously data (orderbook, trades tick by tick, ohlc, etc) and save it in a database. *Currently only support Bitfinex and Bitmex exchanges*.
|
|
33
|
-
|
|
34
|
-
- **Historical Downloader** ``dccd.histo_dl``:
|
|
35
|
-
Download historical data (ohlc, trades, etc.) and save it. *Currently only support Binance, GDax, Kraken and Poloniex exchanges*.
|
|
36
|
-
|
|
37
|
-
Historical Downloader:
|
|
38
|
-
----------------------
|
|
39
|
-
|
|
40
|
-
The **'dccd.histo_dl'** module contains a main class and four classes to download and update data for each exchange, and a module **'date_time'** to manage specific time format needed for each API.
|
|
41
|
-
|
|
42
|
-
The four classes to download historical data are **FromBinance**, **FromGDax**, **FromKraken** and **FromPoloniex**. All have the same methods and almost the same parameters:
|
|
43
|
-
|
|
44
|
-
- **__init__(path, crypto, span, fiat(optional), form(optional))** initialisation with **path** is the path where save the data (string), **crypto** is a crypto currency (string) and **span** is the interval time between each observation in seconds (integer) or can be a string as 'hourly', 'daily', etc. (see details on the doc string). The optional parameters are **fiat** the second currency (default is 'USD' and 'USDT' for poloniex and binance) and **form** the format to save the data (default is 'xlsx').
|
|
45
|
-
|
|
46
|
-
- **import\_data(start, end)** download data with **start** and **end** the timestamp (integer) or the date and time (string as 'yyyy-mm-dd hh\:mm\:ss'), respectively of the first observation and the last observation (default are special parameters **start='last'** allow the last data saved and **end='now'** allow the last observation available). Exclusion: Kraken don't allow the **end** parameter and provide only the thousand last observations.
|
|
47
|
-
|
|
48
|
-
- **save(form(optional), by(optional))** save the data with **form** the format of the saved data (default is 'xlsx') and **by** is the "size" of each saved file (default is 'Y' as an entire year). Exclusion: This optional parameters are in progress, let the default parameter for the moment, other are not allow.
|
|
49
|
-
|
|
50
|
-
- **get\_data()** returns the data frame without any parameter.
|
|
51
|
-
|
|
52
|
-
Method chaining is available.
|
|
53
|
-
|
|
54
|
-
Installation:
|
|
55
|
-
=============
|
|
56
|
-
|
|
57
|
-
Install the library from pip:
|
|
58
|
-
-----------------------------
|
|
59
|
-
|
|
60
|
-
$ pip install dccd
|
|
61
|
-
|
|
62
|
-
Install the library from source:
|
|
63
|
-
--------------------------------
|
|
64
|
-
|
|
65
|
-
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
66
|
-
|
|
67
|
-
$ cd Download_Crypto_Currencies_Data
|
|
68
|
-
|
|
69
|
-
$ python setup.py install --user
|
|
70
|
-
|
|
71
|
-
Requirements:
|
|
72
|
-
=============
|
|
73
|
-
|
|
74
|
-
- numpy>=1.14.1
|
|
75
|
-
- pandas>=0.22.0
|
|
76
|
-
- requests>=2.18.4
|
|
77
|
-
- xlrd>=1.1.0
|
|
78
|
-
- xlsxwriter>=1.0.2
|
|
79
|
-
- websockets>=7.0.0
|
|
80
|
-
- scipy>=1.2.0
|
|
81
|
-
- SQLAlchemy>=1.3.0
|
|
82
|
-
|
|
83
|
-
Supported exchanges:
|
|
84
|
-
====================
|
|
85
|
-
|
|
86
|
-
- **Binance.**
|
|
87
|
-
|
|
88
|
-
- **Bitfinex.**
|
|
89
|
-
|
|
90
|
-
- **Bitmex.**
|
|
91
|
-
|
|
92
|
-
- **GDAX.**
|
|
93
|
-
|
|
94
|
-
- **Kraken.**
|
|
95
|
-
|
|
96
|
-
- **Poloniex.**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
.. [*] Package not achieved, always in progress. This is my first one package, all advice is welcome.
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dccd
|
|
3
|
-
Version: 2.0.0
|
|
4
|
-
Summary: Download Crypto Currency Data from different exchanges.
|
|
5
|
-
Author-email: Arthur Bernard <arthur.bernard.92@gmail.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
8
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Classifier: Topic :: Database
|
|
18
|
-
Classifier: Topic :: Office/Business :: Financial
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Description-Content-Type: text/x-rst
|
|
21
|
-
License-File: LICENSE.txt
|
|
22
|
-
Requires-Dist: numpy>=1.26
|
|
23
|
-
Requires-Dist: pandas>=2.0
|
|
24
|
-
Requires-Dist: requests>=2.28
|
|
25
|
-
Requires-Dist: openpyxl>=3.1
|
|
26
|
-
Requires-Dist: websockets>=12.0
|
|
27
|
-
Requires-Dist: scipy>=1.10
|
|
28
|
-
Requires-Dist: SQLAlchemy>=2.0
|
|
29
|
-
Requires-Dist: tenacity>=8.0
|
|
30
|
-
Requires-Dist: pydantic>=2.0
|
|
31
|
-
Provides-Extra: io
|
|
32
|
-
Requires-Dist: pyarrow>=13; extra == "io"
|
|
33
|
-
Requires-Dist: polars>=0.20; extra == "io"
|
|
34
|
-
Provides-Extra: dev
|
|
35
|
-
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
36
|
-
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
37
|
-
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
38
|
-
Requires-Dist: interrogate>=1.5; extra == "dev"
|
|
39
|
-
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
40
|
-
Requires-Dist: pandas-stubs>=2.0; extra == "dev"
|
|
41
|
-
Provides-Extra: doc
|
|
42
|
-
Requires-Dist: sphinx>=7.0; extra == "doc"
|
|
43
|
-
Requires-Dist: furo; extra == "doc"
|
|
44
|
-
Requires-Dist: numpydoc; extra == "doc"
|
|
45
|
-
Requires-Dist: sphinx-design; extra == "doc"
|
|
46
|
-
Requires-Dist: sphinx-copybutton; extra == "doc"
|
|
47
|
-
Dynamic: license-file
|
|
48
|
-
|
|
49
|
-
=============================
|
|
50
|
-
Download Crypto-Currency Data
|
|
51
|
-
=============================
|
|
52
|
-
|
|
53
|
-
.. image:: https://img.shields.io/pypi/pyversions/dccd
|
|
54
|
-
:alt: PyPI - Python Version
|
|
55
|
-
.. image:: https://img.shields.io/pypi/v/dccd.svg
|
|
56
|
-
:target: https://pypi.org/project/dccd/
|
|
57
|
-
.. image:: https://img.shields.io/pypi/status/dccd.svg?colorB=blue
|
|
58
|
-
:target: https://pypi.org/project/dccd/
|
|
59
|
-
.. image:: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data.svg?branch=master
|
|
60
|
-
:target: https://travis-ci.org/ArthurBernard/Download_Crypto_Currencies_Data
|
|
61
|
-
.. image:: https://img.shields.io/github/license/ArthurBernard/Download_Crypto_Currencies_Data.svg
|
|
62
|
-
:target: https://github.com/ArthurBernard/Download_Crypto_Currencies_Data/blob/master/LICENSE.txt
|
|
63
|
-
.. image:: https://pepy.tech/badge/dccd
|
|
64
|
-
:target: https://pepy.tech/project/dccd
|
|
65
|
-
.. image:: https://readthedocs.org/projects/download-crypto-currencies-data/badge/?version=latest
|
|
66
|
-
:target: https://download-crypto-currencies-data.readthedocs.io/en/latest/?badge=latest
|
|
67
|
-
:alt: Documentation Status
|
|
68
|
-
.. image:: https://img.shields.io/lgtm/grade/python/g/ArthurBernard/Download_Crypto_Currencies_Data.svg?logo=lgtm&logoWidth=18
|
|
69
|
-
:target: https://lgtm.com/projects/g/ArthurBernard/Download_Crypto_Currencies_Data/context:python)
|
|
70
|
-
:alt: Language grade: Python
|
|
71
|
-
|
|
72
|
-
This is the starting point of a python package [*]_ to automatically *download* data and *update* database with *crypto-currency* data (bitcoin, ether, litecoin, etc.) from different API exchanges (allow only Binance, Bitmex, Bitfinex, GDAX, Kraken and Poloniex for the moment).
|
|
73
|
-
|
|
74
|
-
Presentation:
|
|
75
|
-
=============
|
|
76
|
-
|
|
77
|
-
The ``dccd`` package allow you two main methods to download data. The first one is recommended to download data at high frequency (**minutely** or **tick by tick**), and the second one is recommended to download data at a lower frequency (**hourly** or **daily**):
|
|
78
|
-
|
|
79
|
-
- **Continuous Downloader** ``dccd.continuous_dl``:
|
|
80
|
-
Download and update continuously data (orderbook, trades tick by tick, ohlc, etc) and save it in a database. *Currently only support Bitfinex and Bitmex exchanges*.
|
|
81
|
-
|
|
82
|
-
- **Historical Downloader** ``dccd.histo_dl``:
|
|
83
|
-
Download historical data (ohlc, trades, etc.) and save it. *Currently only support Binance, GDax, Kraken and Poloniex exchanges*.
|
|
84
|
-
|
|
85
|
-
Historical Downloader:
|
|
86
|
-
----------------------
|
|
87
|
-
|
|
88
|
-
The **'dccd.histo_dl'** module contains a main class and four classes to download and update data for each exchange, and a module **'date_time'** to manage specific time format needed for each API.
|
|
89
|
-
|
|
90
|
-
The four classes to download historical data are **FromBinance**, **FromGDax**, **FromKraken** and **FromPoloniex**. All have the same methods and almost the same parameters:
|
|
91
|
-
|
|
92
|
-
- **__init__(path, crypto, span, fiat(optional), form(optional))** initialisation with **path** is the path where save the data (string), **crypto** is a crypto currency (string) and **span** is the interval time between each observation in seconds (integer) or can be a string as 'hourly', 'daily', etc. (see details on the doc string). The optional parameters are **fiat** the second currency (default is 'USD' and 'USDT' for poloniex and binance) and **form** the format to save the data (default is 'xlsx').
|
|
93
|
-
|
|
94
|
-
- **import\_data(start, end)** download data with **start** and **end** the timestamp (integer) or the date and time (string as 'yyyy-mm-dd hh\:mm\:ss'), respectively of the first observation and the last observation (default are special parameters **start='last'** allow the last data saved and **end='now'** allow the last observation available). Exclusion: Kraken don't allow the **end** parameter and provide only the thousand last observations.
|
|
95
|
-
|
|
96
|
-
- **save(form(optional), by(optional))** save the data with **form** the format of the saved data (default is 'xlsx') and **by** is the "size" of each saved file (default is 'Y' as an entire year). Exclusion: This optional parameters are in progress, let the default parameter for the moment, other are not allow.
|
|
97
|
-
|
|
98
|
-
- **get\_data()** returns the data frame without any parameter.
|
|
99
|
-
|
|
100
|
-
Method chaining is available.
|
|
101
|
-
|
|
102
|
-
Installation:
|
|
103
|
-
=============
|
|
104
|
-
|
|
105
|
-
Install the library from pip:
|
|
106
|
-
-----------------------------
|
|
107
|
-
|
|
108
|
-
$ pip install dccd
|
|
109
|
-
|
|
110
|
-
Install the library from source:
|
|
111
|
-
--------------------------------
|
|
112
|
-
|
|
113
|
-
$ git clone https://github.com/ArthurBernard/Download_Crypto_Currencies_Data
|
|
114
|
-
|
|
115
|
-
$ cd Download_Crypto_Currencies_Data
|
|
116
|
-
|
|
117
|
-
$ python setup.py install --user
|
|
118
|
-
|
|
119
|
-
Requirements:
|
|
120
|
-
=============
|
|
121
|
-
|
|
122
|
-
- numpy>=1.14.1
|
|
123
|
-
- pandas>=0.22.0
|
|
124
|
-
- requests>=2.18.4
|
|
125
|
-
- xlrd>=1.1.0
|
|
126
|
-
- xlsxwriter>=1.0.2
|
|
127
|
-
- websockets>=7.0.0
|
|
128
|
-
- scipy>=1.2.0
|
|
129
|
-
- SQLAlchemy>=1.3.0
|
|
130
|
-
|
|
131
|
-
Supported exchanges:
|
|
132
|
-
====================
|
|
133
|
-
|
|
134
|
-
- **Binance.**
|
|
135
|
-
|
|
136
|
-
- **Bitfinex.**
|
|
137
|
-
|
|
138
|
-
- **Bitmex.**
|
|
139
|
-
|
|
140
|
-
- **GDAX.**
|
|
141
|
-
|
|
142
|
-
- **Kraken.**
|
|
143
|
-
|
|
144
|
-
- **Poloniex.**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
.. [*] Package not achieved, always in progress. This is my first one package, all advice is welcome.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|