Seamlessly list and download Binance spot trade .zip files from the public S3 bucket
Project description
binance-s3-trades
Seamlessly list and download Binance spot-trade .zip archives from Binance’s public S3 bucket.
Installation
From PyPI
pip install binance-s3-trades
From source
git clone https://github.com/mpolit/binance-s3-trades.git
cd binance-s3-trades
poetry install
Usage
Python API
from binance_s3_trades import BinanceTradeDownloader
dl = BinanceTradeDownloader(
max_workers=4,
log_level="INFO"
)
# List all BTCUSDT trades for Jan–Mar 2023
keys = dl.list_files(symbols="BTCUSDT", start="2023-01", end="2023-03")
print(keys)
# Dry-run download into ./data
dl.download_all(
target_dir="./data",
symbols="BTCUSDT",
start="2023-01",
end="2023-03",
dry_run=True
)
Command-Line Interface
After installation, use the binance-s3-trades command:
# List matching files
binance-s3-trades list \
--symbol BTCUSDT \
--start 2023-01 \
--end 2023-03
# Download (with overwriting or dry-run)
binance-s3-trades download ./data \
--symbol BTCUSDT \
--start 2023-01 \
--dry-run
Run binance-s3-trades --help for full options.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines and our code of conduct.
License
This project is licensed under the MIT License. See LICENSE for details.
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 binance_s3_trades-0.1.0.tar.gz.
File metadata
- Download URL: binance_s3_trades-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.1 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
224a7b05a7535618f2489df1479c18a9e127ffad5ecced18ace6b2852e0aac8c
|
|
| MD5 |
dc3b4d73096dbbf5e2c98625117ef6ee
|
|
| BLAKE2b-256 |
8007f753a2c3cbd5786d1c743e2462da28ebd9a765a091c04a868d8699f52f3c
|
File details
Details for the file binance_s3_trades-0.1.0-py3-none-any.whl.
File metadata
- Download URL: binance_s3_trades-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.1 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29a05e23c2fbea6e5686fe9a42768386bb055061d2dc6ca54576e646487f83d
|
|
| MD5 |
0d2568a54119755647ddf62ddfbfc9af
|
|
| BLAKE2b-256 |
00fd3197417e196b15a3edd33ebac666b29ba0085c18bd475c0c9c2a29ff3f91
|