New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crypto-candlesticks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-candlesticks

Download candlestick data fast & easy for analysis

  • 0.2.1
  • PyPI
  • Socket score

Maintainers
1

crypto-candlesticks 📈

wemake-python-styleguide Tests Codecov Documentation Status Security: bandit PyPI - License PyPI Python Version pre-commit Downloads

gif-animation


The goal behind this project is to facilitate downloading cryptocurrency candlestick data fast & simple. Currently only the Bitfinex exchange is supported with more to come in future releases.

The command-line interface is built using Click, which is intuitive and will prompt you for the commands.

Once the data is downloaded, it will be converted and stored in a .csv, .sqlite3 and .pickle file for convenient analysis. The data will include the Open, High, Low, Close of the candles and the volume during the interval and its timestamp.

See documentation and Github repository for more information.

Installation

To install the Crypto-candlesticks project, run this command in your terminal:

   pip install crypto-candlesticks

Or if you are using Poetry

    poetry add crypto-candlesticks

Usage

crypto-candlesticks can be used the following way:

    $ crypto-candlesticks
    "Welcome, what data do you wish to download?"

Which will prompt the following:

    Cryptocurrency symbol to download (ie. BTC, ETH, LTC):
    Base pair:
    Interval to download the candlestick data:
    Date to start downloading the data (ie. YYYY-MM-DD):
    Date up to the data will be downloaded (ie. YYYY-MM-DD):

Or you can pass the arguments yourself and skip the prompt:

   crypto-candlesticks [OPTIONS]

   Available options:

   -s <symbol>, --symbol <symbol>

   The ticker you wish to download,
   currently, only data from the Bitfinex exchange
   is supported.
   (e.g. [BTC|ETH|LTC] etc.)

   -b <base currency>, --base_currency <base currency>

    The base pair for the ticker.
    (e.g. [USD|USDT|EUR|CNHT|GBP|JPY|DAI|BTC|EOS|ETH|XCHF|USTF0])

   -i <interval>, --interval <interval>

    The interval for each bar.
    (e.g. [1m|5m|15m|30m|1h|3h|6h|12h|1D|7D|14D|1M])

   -sd <start date>, --start_date <start date>

    YYYY, MM, DD from which the candlestick data
    will start.
    (e.g. [2018-01-01])

   -ed <end date>, --end date <end date>

    YYYY, MM, DD up to which the candlestick
    data will be downloaded.
    (e.g. [2020-01-01])

   --help

   Display a short usage message and exit.

Example output for CSV

OpenCloseHighLowVolumeTickerDateTime
720372017203.77200.19.404174BTC/USD12/31/201916:00:00
72017223.67223.672017.9037398BTC/USD12/31/201916:01:00
7224.472257225.57224.40.4799298BTC/USD12/31/201916:02:00
7224.9817225.97225.97224.9810.9294573BTC/USD12/31/201916:03:00
7225.8627225.72957225.97225.72950.2913202BTC/USD12/31/201916:04:00
7225.77225.86737225.97225.29731.0319704BTC/USD12/31/201916:05:00

Example output for SQL (the timestamp is shown in milliseconds)

IDTimestampOpenCloseHighLowVolumeTickerInterval
11577868000000.07205.77205.87205.87205.70.07137942BTCUSD1m
21577867940000.07205.701553057205.87205.87205.701553050.035BTCUSD1m
31577867880000.07205.77205.701553057205.701553057205.70.025BTCUSD1m
41577867820000.07205.752997487205.752997487205.752997487205.70.075BTCUSD1m
51577867760000.07205.752997487205.27206.37205.20.005BTCUSD1m
61577867700000.07205.27205.27205.27205.24.5802BTCUSD1m

Contributing

Feel free to open an issue or pull request on Github.

License

GPL-3.0-or-later

Buy me a coffee

ETH: 0x06Acb31587a96808158BdEd07e53668d8ce94cFE

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc