Skip to main content

Cryptocurrency bot development platform

Project description

Blankly_Github_Logo Maintainability Rating Security Rating Quality Gate Status Downloads Docs Badge Docs Badge

What is it?

​ Blankly is an elegant python library for interacting with many crypto exchanges on multiple portfolios in a consistent way. Blankly offers a powerful feature-set, optimized for speed and ease of use.

Try it out: pip install blankly

Check out our website.

Features

  • Full REST API support for non-margin accounts on listed exchanges

  • Ticker websocket support

  • Order book websocket support

  • Fully multiprocessed bots with flexible arguments.

  • Quickstart access for interacting with exchanges

  • Support for multiple portfolios on multiple exchanges, all independently

  • Multi-process communication

  • Long term and high resolution historical data downloads as pandas dataframes

  • Single pip module (pip install Blankly)

  • Asynchronous callbacks from ticker feeds

  • ZeroRPC server to report to Javascript or React **

  • Easy access to raw API calls

  • Customizable circular buffer websocket feeds

  • Support for coinbase pro & binance sandbox modes

  • Instant paper trade wrapper for supported exchanges

  • Run scheduled functions natively

  • Logs for websocket feeds

  • Status management for purchases

  • Create strategies using an event-based framework

  • Instantly backtest your strategies (strategy.backtest(to='1y'))

  • Automatic price downloads & caching for use in backtests

  • Interface that allows calls to each supported exchange to be identical:

    Buy example for Coinbase Pro and Binance:

    Coinbase Pro:

    self.Interface.market_order(.01, "buy", "BTC-USD")
    

    Binance:

    self.Interface.market_order(.01, "buy", "BTC-USD")
    

** Means that the feature is still in development but has some degree of support.

Coming Features

  • Deployment (> Blankly push bot/*)
  • Online hosting

Quick Start

  1. Using Blankly is incredibly easy. It just requires the pip module and 3 basic files. First install the pip module by

pip install Blankly

  1. Next you need the files in the Examples folder:

Basic_Bot.py

Keys_Example.json

Settings.json

  1. Place these in the root or working directory of the project.

  2. Rename Keys_Example.json to Keys.json or create your own .json that has the same structure.

  3. Insert the API keys from your exchange into the renamed Keys.json file.

    1. You can add multiple portfolios! You can specify the name of the portfolio to load when you construct the exchange.
    2. Example: Blankly.Coinbase_Pro(portfolio_name="my cool portfolio")).
    3. If you don't provide one to the constructor, it will just default to the first one given in the Keys.json file and show a warning.
  4. The script defaults to Coinbase Pro. If you're using that, great! If not, change the line that says:

    exchange = Blankly.Coinbase_Pro()

    to one that matches your exchange, such as:

    exchange = Blankly.Binance()

  5. Everything should work! Run the Basic_Bot example in Basic_Bot.py. Note a warning will be shown because the Basic_Bot script does not specify the exchange name by default (explained in step 5 above).

    • Note the library is developed on Python 3.7, but most modern versions of python 3 should work.

Commands & Docs Overview

Exchanges

Exchange REST Support Ticker Websocket Order Book Interface
Coinbase Pro 🟢 🟢 🟢 🟢
Binance 🟢 🟢 🟢 🟡
Alpaca 🟡 🔴 🔴 🟡

🟢 = working

🟡 = in development, some or most features are working

🔴 = planned but not yet in development

  • Interface calls take ~300 µs extra to homogenize the exchange data.

Docs

https://docs.blankly.finance

Bugs

Please report any bugs or issues in Github's Issues page.

Disclaimer

Trading is risky. We are not responsible for losses incurred using this software, software fitness for any particular purpose, or responsibility for any issues or bugs. This is free software.

Contributing

If you would like to support the project, pull requests are welcome. You can also contribute just by telling us what you think of Blankly: https://forms.gle/4oAjG9MKRTYKX2hP9

New updates every day 💪.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Blankly-0.1.12a0.tar.gz (82.6 kB view hashes)

Uploaded Source

Built Distribution

Blankly-0.1.12a0-py3-none-any.whl (128.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page