REST API and WebSocket asyncio wrapper with grpc powered multiplexer server for crypto exchanges
Project description
Crypto exchanges API/WSS wrapper with grpc powered server
Binance, FTX, Bitfinex
For SPOT markets
From v1.2.5 work path relocated to home/user/.MartinBinance/
exchanges-wrapper vs binance.py
The main difference is the development of the project for trading with many exchanges, including DeFi platforms shortly.
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)
- Covers general endpoints (test connectivity and get exchange information's)
- Covers market data endpoints
- Covers Account endpoints (create and manage orders)
- Covers user data stream (receive real time user updates)
- Covers web socket streams (receive real time market updates)
- Async support
- Auto reconnect after exchanges API or network failure
- Completely free and without limitations
Added Features
- Multi exchanges support
- Adaptive algorithm to ensure maximum performance and avoid exceeding the rates limits
- Passthrough logging
FTX Implementation features
- Binance REST API and WSS are accepted as basic, connection of FTX and other exchanges wrapped their API to Binance compatible
- For FTX, some data cannot be obtained by directly calling one method, it is generated by a synthetic or calculation method
- FTX have not any testing or "paper trading" features, therefore, application development and testing is possible only at real bidding. First, run applications on the Binance Spot Test Network.
Get started
Install
To install the library, you can just run the following command:
pip install exchanges-wrapper
Prepare exchange account
- Create account on Binance and get 10% discount on all trading fee
- Create account on Bitfinex and get 6% rebate fee
- Create account on FTX
- For test purpose log in at Binance Spot Test Network
- Create API Key
Startup
- Specify api_key and api_secret in
exchanges_wrapper/exch_srv_cfg.toml
- Run
exchanges_wrapper/exch_srv.py
in terminal window - In
example/ms_cfg.toml
select desired exchange. Don't change exchange name. - Run
example/exch_client.py
in other terminal window
Documentations
- For binance.py use original
- Served methods and examples of their use are described at
example/exch_client.py
- For Protocol Buffers serializing structured data
see
proto/exchanges_wrapper/api.proto
Donate
BNB, BUSD, USDT (BEP20) 0x5b52c6ba862b11318616ee6cef64388618318b92
USDT (TRC20) TP1Y43dpY7rrRyTSLaSKDZmFirqvRcpopC
Powered by exchanges-wrapper
martin-binance Free trading system for crypto exchanges SPOT markets. Adaptive customizable reverse grid strategy based on martingale.
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
File details
Details for the file exchanges-wrapper-1.2.5.tar.gz
.
File metadata
- Download URL: exchanges-wrapper-1.2.5.tar.gz
- Upload date:
- Size: 53.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caecd77f331fb8f32bb5132f42b73c98fad3ea26ce40810b6a88fbed754944f9 |
|
MD5 | 401e68e6670f593f0df31426530d2fc8 |
|
BLAKE2b-256 | ac0c8f0f8138610f006ec0266dd413df7b880892d16a763e4414879e52ddbb0e |
File details
Details for the file exchanges_wrapper-1.2.5-py3-none-any.whl
.
File metadata
- Download URL: exchanges_wrapper-1.2.5-py3-none-any.whl
- Upload date:
- Size: 52.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b14fbe3f4d73b6b3e82ada8a2e1e07448480f4c00331cbaa553c548dd8b0e5 |
|
MD5 | a54ad3bcc21e7f1cb779ed09dddb7260 |
|
BLAKE2b-256 | 3d7fffca5dd93e36cf485ff325c38eb2768490e062fe1256a31b4b0369346778 |