Skip to content

Python script for generating candlestick CSV dataset aggregating trade data from several exchanges

License

Notifications You must be signed in to change notification settings

victormartingarcia/bitcoin-OHLC-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple python script for aggregating bitcoin raw trade data from several exchanges, and combine them into a single CSV file containing minute OHCLV candlesticks

Installing

# Install dependencies from requirements.txt file
$ pip install -r requirements.txt

Usage

$ python bitcoin-OHLC-generator.py --compression 1 -o bitcoin.csv

Required args:

  • -c (--compression) num : Aggregate data into num minute OHLCV candlesticks
  • -o (--output) file : Save generated candlesticks into file CSV format file

Motivation

Bitcoin cryptocurrency is trading into different spot-exchanges, each of those with its last price, usually defined by the mid-price between its best bid and its bets offer (ask) prices.

The closest thing to an "official" BTCUSD price is the Bitcoin Reference Rate published by the Chicago Mercantile Exchange.

This reference price (and CME CF Bitcoin Real-time index) is calculated aggregating the trade flow of 5 major bitcoin spot exchanges:

* bitstamp
* coinbase
* bitfinex
* kraken
* itbit

This is the approach I followed to build this script, creating a tool that generates "official" historical OHLC candlestick data.

Aggregation

I hope you find this useful. Enjoy the ride!

Bitcoin explosive growth

About

Python script for generating candlestick CSV dataset aggregating trade data from several exchanges

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages