Cryptocurrency bot development platform
Project description
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
- Using Blankly is incredibly easy. It just requires the pip module and 3 basic files. First install the pip module by
pip install Blankly
- Next you need the files in the
Examples
folder:
Basic_Bot.py
Keys_Example.json
Settings.json
-
Place these in the
root
orworking directory
of the project. -
Rename
Keys_Example.json
toKeys.json
or create your own.json
that has the same structure. -
Insert the API keys from your exchange into the renamed
Keys.json
file.- You can add multiple portfolios! You can specify the name of the portfolio to load when you construct the exchange.
- Example:
Blankly.Coinbase_Pro(portfolio_name="my cool portfolio")
). - 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.
-
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()
-
Everything should work! Run the
Basic_Bot
example inBasic_Bot.py
. Note a warning will be shown because theBasic_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
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
Built Distribution
Hashes for Blankly-0.1.12a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6732c892ae58b9e2fa43111dc044f0bc42bbeb89bc6b1e02ddc52e68aefab2e8 |
|
MD5 | 6eb44ba2d67d97695fc9685798a3c172 |
|
BLAKE2b-256 | 81caa85063860b33567592adb8a3a55dfe1cee636c43c4695c6fd66678f67b4d |