Documentation: https://unicorn-binance-rest-api.docs.lucit.tech/
Github: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api
PyPI: https://pypi.org/project/unicorn-binance-rest-api/
Installation
You can install the library with `pip install unicorn-binance-rest-api
` from PyPI or you download the latest release or the dev-stage. The easiest way to test the examples is to clone the repository from git with `git clone git@github.com:LUCIT-Systems-and-Development/unicorn-binance-rest-api.git
` to your local system.
How to use the class?
from unicorn_binance_rest_api.manager import BinanceRestApiManager
api_key = "aaa"
api_secret = "bbb"
ubra = BinanceRestApiManager(api_key, api_secret, exchange="binance.com")
depth = ubra.get_order_book(symbol='BNBBTC')
print(f"{depth}")
prices = ubra.get_all_tickers()
print(f"{prices}")
print(f"Used weight: {ubra.get_used_weight()}")
Configure logging, to get a very verbose mode use DEBUG instead of INFO:
logging.getLogger("unicorn_binance_rest_api") logging.basicConfig(level=logging.INFO, filename=os.path.basename(__file__) + '.log', format="{asctime} [{levelname:8}] {process} {thread} {module}: {message}", style="{")
Here are some working example files (just clone the repository and run them):
https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/master/example_doing_something.py
https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/master/example_easy_migration_from_python-binance.py
https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/master/example_orders.py
https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/master/example_version_of_this_package.py