Coder Social home page Coder Social logo

lucit-systems-and-development / unicorn-binance-suite Goto Github PK

View Code? Open in Web Editor NEW
47.0 8.0 8.0 14.27 MB

LUCIT's UNICORN Binance Suite is a comprehensive collection of open-source Python packages designed for building sophisticated automated trading systems. Tailored for Python developers, this suite offers seamless integration with the Binance API, enabling the creation of advanced and professional trading bots for streamlined and efficient trading.

Home Page: https://unicorn-binance-suite.docs.lucit.tech

License: Other

Python 68.79% Shell 25.99% Makefile 2.28% Batchfile 2.95%
binance-api binance-exchange binance python-api websocket asyncio websockets rest unicorn-binance-suite

unicorn-binance-suite's People

Contributors

oliver-zehentleitner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unicorn-binance-suite's Issues

File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.__init__ lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid!

Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.

  • I checked the documentation and other Issues. I am using the latest version of this library.

Issue

Hello! I'm following this article https://medium.lucit.tech/passing-binance-market-data-to-apache-kafka-in-python-with-aiokafka-570541574655
Running on a MacOS (Sonoma-latest) with Python 3.9.12 and PIP latest.
I have installed
$ python3 -m pip install aiokafka --upgrade
$ python3 -m pip install unicorn-binance-websocket-api --upgrade

When I try to pyhton3 this script
https://gist.githubusercontent.com/oliver-zehentleitner/92b632f582df22523b1d5593faa0a4f4/raw/cdd6d27a1efcb2a5bca3985f9337286ce457d3e3/ubwa_apache_kafka.py

I get an error
File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.init
lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid!

I have followed this article (I've downloaded two licenses, one with my email, one with my wife's email, to make sure it was not a license issue):
https://medium.lucit.tech/how-to-obtain-and-use-a-unicorn-binance-suite-license-key-and-run-the-ubs-module-according-to-best-87b0088124a8

lucitlicmgr --info
{'license': {'license_holder_email': '[email protected]',
'license_holder_name': 'Chika Andgusta',
'licensed_product': 'UNICORN-BINANCE-SUITE',
'paid_till': '2023-12-10 15:04:39.488397+00:00'},
'signature': '',
'timestamp': '1701623456.1413603'}

I am getting the error

Traceback (most recent call last):
  File "/Users/aengusrooney/github/aengusrooneygrafana/crypto-visualisation/binance-unicorn-suite.py", line 67, in <module>
    ubwa = BinanceWebSocketApiManager(exchange=exchange,
  File "unicorn_binance_websocket_api/manager.py", line 256, in unicorn_binance_websocket_api.manager.BinanceWebSocketApiManager.__init__
  File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.__init__
lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid! Please get a valid license from the LUCIT Online Shop: https://shop.lucit.services/software/unicorn-binance-suite```

and log file: 

```cat binance-unicorn-suite.py.log
2023-12-03 18:03:56,831 [INFO    ] 93840 140704627383104 binance-unicorn-suite: New instance of unicorn-binance-websocket-api_2.1.2-python_3.9.12-compiled on Darwin 23.1.0 for exchange binance.com started ...
2023-12-03 18:03:56,832 [INFO    ] 93840 140704627383104 binance-unicorn-suite: Debug is False
2023-12-03 18:03:56,832 [DEBUG   ] 93840 140704627383104 binance-unicorn-suite: Loading LUCIT license from parameters.
2023-12-03 18:03:56,832 [INFO    ] 93840 140704627383104 binance-unicorn-suite: New instance of lucit-licensing-python_1.8.1-python_3.9.12-compiled on Darwin 23.1.0 started ...
2023-12-03 18:03:56,882 [DEBUG   ] 93840 123145475018752 connectionpool: Starting new HTTPS connection (1): private.api.lucit.services:443
2023-12-03 18:03:57,024 [DEBUG   ] 93840 123145475018752 connectionpool: https://private.api.lucit.services:443 "GET /licensing/v1/verify?license_token=5f4e9c1f-26cd-4016-910f-t70c91087fac3&id=eeb69133-8661-46d2-a611-1a06a806828d&mac=0xacde48001122&os=Darwin&program_used=unicorn-binance-websocket-api&python_version=3.9.12&timestamp=1701623036.8325162&signature=aadecbbd4996359ac5fecc3802cf76b3ab92e8b1b484c652523a6c01b045b103 HTTP/1.1" 500 21
2023-12-03 18:03:57,027 [CRITICAL] 93840 123145475018752 threading: Connection Error - Connection could not be established.
2023-12-03 18:03:57,031 [DEBUG   ] 93840 123145475018752 connectionpool: Starting new HTTPS connection (1): private.api.lucit.services:443
2023-12-03 18:03:57,178 [DEBUG   ] 93840 123145475018752 connectionpool: https://private.api.lucit.services:443 "GET /licensing/v1/verify?license_token=<token>3&id=<id>&mac=0xacde48001122&os=Darwin&program_used=unicorn-binance-websocket-api&python_version=3.9.12&timestamp=1701623037.027499&signature=<signature> HTTP/1.1" 403 52
2023-12-03 18:03:57,180 [CRITICAL] 93840 123145475018752 threading: 403 Forbidden - Insufficient access rights.
2023-12-03 18:03:57,181 [CRITICAL] 93840 123145475018752 threading: The license is invalid! Please get a valid license from the LUCIT Online Shop: https://shop.lucit.services/software/unicorn-binance-suite
2023-12-03 18:03:57,181 [INFO    ] 93840 123145475018752 threading: BinanceWebSocketApiManager.stop_manager() - Stopping unicorn_binance_websocket_api_manager 2.1.2 ...
2023-12-03 18:03:57,181 [DEBUG   ] 93840 123145475018752 threading: BinanceWebSocketApiManager.stop_manager() - AttributeError: 'BinanceWebSocketApiManager' object has no attribute 'stream_list'
2023-12-03 18:03:57,181 [DEBUG   ] 93840 123145475018752 threading: stop_manager() - AttributeError: 'BinanceWebSocketApiManager' object has no attribute 'restclient'
ajrmbp20-3:crypto-visualisation aengusrooney$ python3 --version
Python 3.9.12
ajrmbp20-3:crypto-visualisation aengusrooney$ lucitlicmgr --info
{'license': {'license_holder_email': '[email protected]',
             'license_holder_name': 'Chika Andgusta',
             'licensed_product': 'UNICORN-BINANCE-SUITE',
             'paid_till': '2023-12-10 15:04:39.488397+00:00'},
 'signature': 'f7969fd98c9c8784a491ed2d4927b8b0c2dd80243653c0deb6293c812c376464',
 'timestamp': '1701623456.1413603'}```

Any help would be greatly appreciated!  
Thank you.  

"SIGNATURE FOR THIS REQUEST IS NOT VALID"

from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager
from unicorn_binance_rest_api.unicorn_binance_rest_api_manager import BinanceRestApiManager
import logging
import time
import threading
import os
import requests as requests
import numpy as np
import json
import config

client2 = BinanceRestApiManager(config.API_KEY, config.API_SECRET)
trade_symbol = 'LTCUSDT'
cancelorderlist2 = ["myorder1","myorder2"]
balance = client2.futures_account_balance()
print(balance)
cancelorderbatch2 = client2.futures_cancel_orders(symbol=trade_symbol,origClientOrderIdList=cancelorderslist2)

#the first request of getting balance works fine but while executing second request it throws error
raise BinanceAPIException(self.response)
unicorn_binance_rest_api.unicorn_binance_rest_api_exceptions.BinanceAPIException: APIError(code=-1022): Signature for this request is not valid.

Function for creating multiple orders

hello dear,
first of thak you very much for this library and your contribution towards community.
could we please add function for creating multiple orders.

POST /fapi/v1/batchOrders (HMAC SHA256)

thank you...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.