The python module UNICORN Binance WebSocket API provides an API to the Binance Websocket API`s of Binance, Binance Margin, Binance Futures, Binance Jersey, Binance US, Binance JEX, Binance DEX and Binance DEX Testnet and supports the streaming of all public streams like trade, kline, ticker, depth, bookTicker, forceOrder and blockheight and also all private userData streams which needs to be used with a valid api_key and api_secret from the Binance Exchange www.binance.com,
What are the benefits of the UNICORN Binance WebSocket API?
- Fully managed websockets and 100% auto-reconnect!
- Supported exchanges:
Binance DEX testnet
- Streams are processing asynchronous/concurrent (python asyncio) and each stream is started in a separate thread, but you dont need to deal with asyncio in your code!
- No use of the twisted module, so you can use this lib in a daemonized application (compatible with python-daemon).
- Supports subscriptions/unsubscribe on all exchanges! (Maximum 1024 subscriptions per stream!)
- Support for multiple private
!userDatastreams with different
- If you can not store your data in cause of a temporary technical issue, you can kick back the data to the
stream_bufferwhich stores the receives in the RAM till you are able to process the data in the normal way again. Learn more!
- Compatible with UnicornFy to convert received raw data from crypto API endpoints into well-formed python dictionaries.
- Helpful management features like
unsubscribe_from_stream()and many more, explore them here.
- Nice to use with iPython: “IPython (Interactive Python) is a command shell for interactive computing that offers introspection, rich media, shell syntax, tab completion, and history.” (example_interactive_mode.py)
- Monitoring API service and a check_command for ICINGA/Nagios
- Excessively tested on Linux, Mac and Windows