crypto-futures-py

The Python library of different implementations for exchange interface of cryptocurrency futures trading. Includes Bitmex and Binance Futures.


Keywords
api, api-client, binance, binance-futures, bitmex, cryptocurrency-futures-trading, exchange
License
PSF-2.0
Install
pip install crypto-futures-py==0.4.3

Documentation

CryptoFuturesPy

The Python library for different implementations of a exchange interface for cryptocurrency futures trading

GitHub issues GitHub pull requests License Code style: black

Overview

One day, I was tried to be messing with different interfaces of Binance, Bitmex and etc so I desided to create an interface for them and to make some implementations.

So, there exists a Bitmex and a Binance Futures implementation now, but more are coming soon.

All code is written on Python 3.7 with typing specifications.

Installation

You can easily install it using

pip install crypto-futures-py

and then access it in your Python code like that:

from crypto_futures_py import BitmexExchangeHandler

Usage

Create an object of your wanted exchange and provide your keys for this exchange there.

from crypto_futures_py import BitmexExchangeHandler

handler = BitmexExchangeHandler("publickey", "privatekey")

After that you can call it's methods to load data or to place orders:

handler.start_kline_socket(lambda x: print(x), candle_type="1m", pair_name="XBTUSD")

All the methods are described in AbstractExchangeHandler and later would be in a separate documentation.

TODO

  • Add Binance implementation
  • Add a documentation
  • Make websocket threads stoppable

Licence

CryptoFuturesPy is MIT licenced