Skip to main content

crypto_history is a python package for extracting history of crypto-currencies from various exchanges and presenting them ivn a data-format of choice

Project description

https://img.shields.io/pypi/v/crypto-history.svg https://img.shields.io/pypi/l/crypto-history.svg https://img.shields.io/pypi/wheel/crypto-history.svg https://img.shields.io/pypi/pyversions/crypto-history.svg Documentation Status crypto-history download status per week crypto-history coveralls coverage

This is a wrapper on binance and other exchange APIs to aggregate historical information in structured tabular formats (such as xarray.DataArray)

Source code

https://github.com/vikramaditya91/crypto_history

Documentation

https://crypto-history.readthedocs.io/en/latest/

Features

  • Cleans the data ticker-wise if incomplete

  • Sets the correct type on the data obtained

  • Is able to join data from various chunks of time in a single DataArray

  • Candles of varying intervals can be obtained in a single DataArray

  • Fetches information about all tickers available on Binance asynchronously

  • Delays requests if it is close to the limit prescribed by Binance

  • Retries when the requests have exceeded the performance limit of the machine

  • Obtains the history of each/all tickers in the xarray.DataArray format

  • Easily extendable to other exchanges and other data formats

  • It does not require an API key from Binance

Quick Start

pip install crypto-history

See a basic example at :examples/binance_basic.py

exchange_factory = class_builders.get("market").get("binance")()

desired_fields = ["open_ts", "open"]

binance_homogenizer = exchange_factory.create_data_homogenizer()
base_assets = await binance_homogenizer.get_all_base_assets()
print(f"All the base assets available on the Binance exchange are {base_assets}")

time_range = {("25 Jan 2020", "27 May 2020"): "1d",
              ("26 Aug 2020", "now"):         "1h"}
time_aggregated_data_container = data_container_intra.TimeAggregatedDataContainer(
    exchange_factory,
    base_assets=["NANO", "IOST", "XRP"],
    reference_assets=["BTC"],
    ohlcv_fields=desired_fields,
    time_range_dict=time_range
)
xdataarray_of_coins = await time_aggregated_data_container.get_time_aggregated_data_container()
pprint(xdataarray_of_coins)

For more check out the documentation.

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

crypto_history-1.2b7.tar.gz (26.2 kB view details)

Uploaded Source

File details

Details for the file crypto_history-1.2b7.tar.gz.

File metadata

  • Download URL: crypto_history-1.2b7.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.6

File hashes

Hashes for crypto_history-1.2b7.tar.gz
Algorithm Hash digest
SHA256 bd380306dd93db9ef72ae5d52fd049e44934a4ab37c76161c3ef8e769efbcb4b
MD5 4fe2b22a0900d8e4a6b1c55deeb5bdb8
BLAKE2b-256 1a192c198285ca98fca3dead074c5abb8c1117d93264d1b4c80650415c9de42e

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