Crypto-Copy-Trader icon indicating copy to clipboard operation
Crypto-Copy-Trader copied to clipboard

Binance API Invalid

Open zakirattari26 opened this issue 3 years ago • 6 comments

binance.exceptions.BinanceAPIException: APIError(code=-2014): API-key format invalid. image image

zakirattari26 avatar Jul 25 '20 20:07 zakirattari26

can you share how do you input the keys? (not the actual key for sure)

MohammedRashad avatar Jul 25 '20 21:07 MohammedRashad

I tried several ways

  1. Input from terminal
  2. Input directly to the db using sqlite browser When I click to run it shows my orderbook both in master & slave in CLI that means APIs were OK but all of a sudden it shows the error API key format invalid. Is there any specific way to input the API......?

zakirattari26 avatar Jul 26 '20 02:07 zakirattari26

Below are SS ct1 ct2 ct3 cc4 This is Masters SS that successfully shows the Master accounts orderbook in CLI.... ct5 This is Slaves SS that successfully shows the Slave accounts orderbook in CLI.... ct6

zakirattari26 avatar Jul 26 '20 02:07 zakirattari26

Traceback (most recent call last) File "C:\Python37\lib\site-packages\flask\app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "C:\Python37\lib\site-packages\flask\app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "C:\Python37\lib\site-packages\flask\app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "C:\Python37\lib\site-packages\flask_compat.py", line 35, in reraise raise value File "C:\Python37\lib\site-packages\flask\app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "C:\Python37\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python37\lib\site-packages\flask\app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python37\lib\site-packages\flask_compat.py", line 35, in reraise raise value File "C:\Python37\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "C:\Python37\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "D:\Crypto-Copy-Trader-master\api.py", line 64, in run_process manual_run() File "D:\Crypto-Copy-Trader-master\api.py", line 47, in manual_run client, slaves, old_orders = server_begin() File "D:\Crypto-Copy-Trader-master\main.py", line 128, in server_begin slave_binance = BinanceExchage(apiKey=i[0], apiSecret=i[1], pairs=symbols) File "D:\Crypto-Copy-Trader-master\ExchangeInterfaces\BinanceExchange.py", line 13, in init self.update_balance() File "D:\Crypto-Copy-Trader-master\ExchangeInterfaces\BinanceExchange.py", line 19, in update_balance account_information = self.connection.get_account() File "C:\Python37\lib\site-packages\binance\client.py", line 1578, in get_account return self._get('account', True, data=params) File "C:\Python37\lib\site-packages\binance\client.py", line 222, in _get return self._request_api('get', path, signed, version, **kwargs) File "C:\Python37\lib\site-packages\binance\client.py", line 191, in _request_api return self._request(method, uri, signed, **kwargs) File "C:\Python37\lib\site-packages\binance\client.py", line 186, in _request return self._handle_response() File "C:\Python37\lib\site-packages\binance\client.py", line 215, in _handle_response raise BinanceAPIException(self.response) binance.exceptions.BinanceAPIException: APIError(code=-2014): API-key format invalid. The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame dump(obj) dumps all that's known about the object Que :- Is debugger causing the error ? Can I close the debugger ?

zakirattari26 avatar Jul 26 '20 02:07 zakirattari26

I see my lists of API keys in the database :( . One day I accidentally made a commit of my data base file. Try deleting the master and slave keys first using the delete button in the GUI. Then input yours api keys. Remember the must be 2 or more slaves in master branch (Issue #8).

mokolotron avatar Jul 29 '20 08:07 mokolotron

Thanks Bro... Its working but only in two salves not more than 2

zakirattari26 avatar Jul 29 '20 19:07 zakirattari26