Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

binance_s3_trades-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

binance_s3_trades-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for binance_s3_trades-0.1.0.tar.gz
Algorithm Hash digest
SHA256 224a7b05a7535618f2489df1479c18a9e127ffad5ecced18ace6b2852e0aac8c
MD5 dc3b4d73096dbbf5e2c98625117ef6ee
BLAKE2b-256 8007f753a2c3cbd5786d1c743e2462da28ebd9a765a091c04a868d8699f52f3c

See more details on using hashes here.

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

Hashes for binance_s3_trades-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f29a05e23c2fbea6e5686fe9a42768386bb055061d2dc6ca54576e646487f83d
MD5 0d2568a54119755647ddf62ddfbfc9af
BLAKE2b-256 00fd3197417e196b15a3edd33ebac666b29ba0085c18bd475c0c9c2a29ff3f91

See more details on using hashes here.

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