Skip to content

Commit

Permalink
Merge pull request #15 from aoki-h-jp/feature/1.0.4/importerror
Browse files Browse the repository at this point in the history
Feature/1.0.4/importerror
  • Loading branch information
aoki-h-jp authored Aug 25, 2023
2 parents 3df7bf5 + fcddab9 commit 04965f5
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 52 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ pip install git+https://github.com/aoki-h-jp/binance-bulk-downloader

## Usage
### Download all klines 1m data (USDT-M futures)

```python
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

downloader = BinanceBulkDownloader()
downloader.run_download()
```

### Download all klines 1h data (Spot)

```python
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

downloader = BinanceBulkDownloader(data_frequency='1h', asset='spot')
downloader.run_download()
```

### Download all aggTrades data (USDT-M futures)

```python
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

downloader = BinanceBulkDownloader(data_type='aggTrades')
downloader.run_download()
```
Expand All @@ -48,7 +54,7 @@ python -m pytest
```

## Available data types
✅: Implemented and tested. ❌:Not available on Binance.
✅: Implemented and tested. ❌: Not available on Binance.

### by data_type

Expand Down
1 change: 0 additions & 1 deletion __init__.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""
BinanceBulkDownloader: A library to efficiently and concurrently download historical data from Binance.
"""
from .downloader import BinanceBulkDownloader
import binance_bulk_downloader.downloader
import binance_bulk_downloader.exceptions
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from rich.progress import track

# import my libraries
from .exceptions import (BinanceBulkDownloaderDownloadError,
BinanceBulkDownloaderParamsError)
from binance_bulk_downloader.exceptions import (
BinanceBulkDownloaderDownloadError, BinanceBulkDownloaderParamsError)


class BinanceBulkDownloader:
Expand Down
File renamed without changes.
Empty file removed example/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions example/download_aggtrades.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="aggTrades")
Expand Down
4 changes: 2 additions & 2 deletions example/download_bookdepth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="bookDepth")
Expand Down
4 changes: 2 additions & 2 deletions example/download_bookticker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="bookTicker")
Expand Down
4 changes: 2 additions & 2 deletions example/download_bvolindex.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="BVOLIndex", asset="option")
Expand Down
4 changes: 2 additions & 2 deletions example/download_eohsummary.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="EOHSummary", asset="option")
Expand Down
4 changes: 2 additions & 2 deletions example/download_fundingrate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(
Expand Down
4 changes: 2 additions & 2 deletions example/download_indexpriceklines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="indexPriceKlines")
Expand Down
4 changes: 2 additions & 2 deletions example/download_klines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader()
Expand Down
4 changes: 2 additions & 2 deletions example/download_liquidationsnapshot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="liquidationSnapshot")
Expand Down
4 changes: 2 additions & 2 deletions example/download_markpriceklines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="markPriceKlines")
Expand Down
4 changes: 2 additions & 2 deletions example/download_metrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="metrics")
Expand Down
4 changes: 2 additions & 2 deletions example/download_premiumindexklines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="premiumIndexKlines")
Expand Down
4 changes: 2 additions & 2 deletions example/download_trades.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import downloader
from downloader import BinanceBulkDownloader
# import binance_bulk_downloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader

# generate instance
downloader = BinanceBulkDownloader(data_type="trades")
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from setuptools import find_packages, setup
from setuptools import setup

setup(
name="binance-bulk-downloader",
version="1.0.2",
description="A Python library to efficiently and concurrently download historical data files from Binance. Supports multiple asset types (spot, futures, options) and various data frequencies.",
install_requires=[],
version="1.0.4",
description="A Python library to efficiently and concurrently download historical data files from Binance. Supports all asset types (spot, futures, options) and all frequencies.",
install_requires=["requests", "rich", "pytest"],
author="aoki-h-jp",
author_email="[email protected]",
license="MIT",
packages=find_packages(include=["downloader"], exclude=["tests", "example"]),
packages=["binance_bulk_downloader"],
)
2 changes: 1 addition & 1 deletion tests/test_aggtrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_aggtrades_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bookdepth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_bookdepth_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bookticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_bookticker_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bvolindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_bvolindex_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_eohsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_eohsummary_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fundingrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_fundingrate_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_indexpriceklines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_indexpriceklines_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_klines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_klines_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_liquidationsnapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_liquidationsnapshot_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_markpriceklines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_markpriceklines_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_metrics_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_premiumindexklines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_premiumindexklines_test_params():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_trades.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

# import my libraries
from downloader import BinanceBulkDownloader
from binance_bulk_downloader.downloader import BinanceBulkDownloader


def dynamic_trades_test_params():
Expand Down

0 comments on commit 04965f5

Please sign in to comment.