DogsTailFarmer / exchanges-wrapper

Crypto exchanges API/WSS async wrapper with gRPC powered server
MIT License
12 stars 2 forks source link
async binance bitfinex bybit crypto docker-image grpc huobi okx wrapper-api

Crypto exchanges API/WSS wrapper with grpc powered server

Binance, Bitfinex, Huobi, OKX, Bybit,

For SPOT markets


PyPI version DeepSource DeepSource sonarcloud Downloads


From v1.4.0 must be updated exch_srv_cfg.toml


exchanges-wrapper vs binance.py

The main difference is the development of the project for trading with many exchanges.

Next is adding a new module exchanges_wrapper/exch_srv.py as a multiplexer layer, providing simultaneous async interaction for many accounts and many trading pairs through one connection. It's powered by gRPC Remote Procedure Call framework.

Warning. Coverage of overridden binance.py packages is significant but not complete. Served methods describes into example/exch_client.py

Initial capabilities (inherited from binance.py)

Added Features

Extra exchanges implementation features

Get started

Prepare exchange account

Install use PIP

To install just run the following command:

pip install exchanges-wrapper

After first install create environment by run exchanges-wrapper-init in terminal window.

The structure of the working directory will be created and the necessary files will be copied: For Ubuntu it will be here: home/user/.MartinBinance/

For upgrade to latest versions use:

pip install -U exchanges-wrapper

Start server

Use Docker image

docker pull ghcr.io/dogstailfarmer/exchanges-wrapper:latest

First run

The structure of the working directory will be created and the necessary files will be copied: For Ubuntu it will be here: home/user/.MartinBinance/

docker run --rm --entrypoint /bin/sh exchanges-wrapper -c "cat ./exchanges_wrapper/__init__.py" > init.py && \
docker run --rm --entrypoint /bin/sh exchanges-wrapper -c "cat ./exchanges_wrapper/exch_srv_cfg.toml.template" > exch_srv_cfg.toml.template &&\
 python3 init.py && rm init.py && rm exch_srv_cfg.toml.template

Start server

docker run -itP \
 --mount type=bind,source=/home/ubuntu/.MartinBinance,target=/home/appuser/.MartinBinance \
 --network=host \
 --restart=always \
 --name=exchanges-wrapper \
 exchanges-wrapper

Documentations

Donate

USDT (TRC20) TN8F3Dz8BU8VwECRh3LTKi7FrsU8eWfsZz

Powered by exchanges-wrapper

martin-binance

Free trading system for crypto exchanges SPOT markets. Adaptive customizable reverse grid strategy based on martingale.