Skip to content

Python script to fetch historical OHLCV data from various crypto exchanges.

License

Notifications You must be signed in to change notification settings

Celeborn2BeAlive/cryptobigbro

Repository files navigation

Crypto Big Bro

A python tool to maintain a local OHLCV candles history of crypto instruments for various exchanges.

Goal

The goal is to gather and save a lot of OHLCV data from crypto exchanges for analysis and crypto trading/investing.

Most exchanges are not keeping many OHLCV candles. For example Coinbase Pro only gives use a few hundreds candles in the past. This script allows to fetch periodically the data and save it for later use.

Setup

In a clone of the repository, run the following commands to install a python 3 virtual environment for running the script:

virtualenv venv
source venv/Scripts/activate
pip install -r requirements.txt

Usage

python cryptobigbro ACTION EXCHANGE INSTRUMENT FOLDER [--timeframes TIMEFRAMELIST]

Examples:

  • python cryptobigbro fetch-ohlcv bitmex XBTUSD /home/me/bitmex-XBTUSD-history
  • python cryptobigbro fetch-ohlcv binance ETHBTC /home/me/binance-ETHBTC-history --timeframes 1m,30m,1d
  • python cryptobigbro list-instruments coinbasepro
  • python cryptobigbro list-timeframes binance
  • python cryptobigbro list-exchanges

CSV Files

The fetch-ohlcv command update a file 'EXCHANGE-INSTRUMENT.csv' in the folder specified on the command line. If the file or the folder do not exist, they are created.

The columns of the CSV file are open_timestamp_utc, close_timestamp_utc, open, high, low, close and volume.

Timestamps are in seconds and in UTC timezone.

Todo

About

Python script to fetch historical OHLCV data from various crypto exchanges.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published