Skip to main content

A Python module for downloading Binance futures market data with caching support

Project description

Cached Binance Futures Data Downloader

A Python module for downloading Binance futures market data with efficient caching support.

Features

  • Download Binance futures data for different timeframes
  • Support for custom start and end periods
  • Efficient caching mechanism
  • Handles Binance API rate limits automatically
  • Supports various timeframes (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M)

Installation

pip install cached-binance-data

Quick Start

from cached_binance_data import BinanceDataDownloader

# Initialize downloader
downloader = BinanceDataDownloader()

# Download XRPUSDT data for a specific period
data = downloader.download(
    symbol="XRPUSDT",
    timeframe="1m",
    start_time="2024-01-01",
    end_time="2024-01-31"
)

# Data is automatically cached in hlocv_cache folder
print(data.head())

Cache Structure

Data is cached in the hlocv_cache folder with the following format:

SYMBOL_TIMEFRAME_STARTDATE_STARTTIME_ENDDATE_ENDTIME.npy
Example: XRPUSDT_1M_20240101_000000_20240131_235959.npy

Features

  • Automatic data chunking for large date ranges
  • Smart caching system
  • Handles rate limits gracefully
  • Supports all Binance futures trading pairs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file 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

cached_binance_data-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

cached_binance_data-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cached_binance_data-0.1.0.tar.gz.

File metadata

  • Download URL: cached_binance_data-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.19

File hashes

Hashes for cached_binance_data-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d34b48fe8231ca67c786b4bdb1f4316a8cb96c038e04d986b29b36cae30272a
MD5 80b62c7a58227e04d8b766e296279619
BLAKE2b-256 da07b3b39accdf36c22c7adca46a3221331db9db12e0dd19c803fa985324cc92

See more details on using hashes here.

File details

Details for the file cached_binance_data-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cached_binance_data-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54bb3c939f79d80dfb398aa7f497ff6f82dd80b13b23b683adca15a1798fdbf2
MD5 22421f674d559efbdfb964f73b8a56ec
BLAKE2b-256 9ca17fd7aa0757b2b102f1b9534f0ccb3c7bb6d7e35ad06433e0210fc914cf7a

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