Closed Dogepot2 closed 3 years ago
Having the same problem, i'm trying to find solutions
This is likely an issue with your API keys.
The code uses environment variables stored on the machine, but you don't have to do that.
Please reformat your API_KEYS to be api_key = "YOUR_API_KEY"
instead of api_key = os.getenv('some_key')
and try again.
First thank you for the advice.
Please reformat your API_KEYS to be
api_key = "YOUR_API_KEY"
instead ofapi_key = os.getenv('some_key')
and try again.
So it should look like this right? (xxx - real api keys in quotes)
api_key_live = "xxxx"
api_secret_live = "xxxx"
it ends with same problem
'NoneType' object has no attribute 'encode'
This is likely an issue with your API keys. The code uses environment variables stored on the machine, but you don't have to do that. Please reformat your API_KEYS to be
api_key = "YOUR_API_KEY"
instead ofapi_key = os.getenv('some_key')
and try again.
Tried it and it works, I used single quotes instead of double, but that should make no difference as far as I know.
api_key_live = 'xxxx' api_secret_live = 'xxxx'
I've made new keys and it worked, with single quotes, I dont want to know was it the coma or the key ;) but there is next one in front of me
UTKUSDT has gained 4.8% in the last 5 minutes, calculating volume in USDT
preparing to buy 31.91 UTKUSDT
Traceback (most recent call last)
File "BoBi2.py", line 296, in
@krczk please use the latest commit, that issue is fixed now
@CyberPunkMetalHead I just came across this issue after having pulled the latest, it happens in this context
TP or SL reached, selling 0.15 BNBUSDT...
Traceback (most recent call last):
File "/Users/miguelstevens/Desktop/bot/Binance Detect Moonings.py", line 327, in <module>
coins_sold = sell_coins()
File "/Users/miguelstevens/Desktop/bot/Binance Detect Moonings.py", line 253, in sell_coins
test_order = client.create_test_order(symbol=coin, side='SELL', type='MARKET', quantity=coins_bought[coin]['volume'])
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 1762, in create_test_order
return self._post('order/test', True, data=params)
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 368, in _post
return self._request_api('post', path, signed, version, **kwargs)
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 328, in _request_api
return self._request(method, uri, signed, **kwargs)
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 306, in _request
kwargs = self._get_request_kwargs(method, signed, force_params, **kwargs)
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 262, in _get_request_kwargs
kwargs['data']['signature'] = self._generate_signature(kwargs['data'])
File "/Users/miguelstevens/Library/Python/3.9/lib/python/site-packages/binance/client.py", line 221, in _generate_signature
m = hmac.new(self.API_SECRET.encode('utf-8'), query_string.encode('utf-8'), hashlib.sha256)
I get the following when the script tries to buy:
RLCUSDT has gained 9.972% in the last 5 minutes, calculating volume in USDT CTXCUSDT has gained 7.022% in the last 5 minutes, calculating volume in USDT TRBUSDT has gained 3.737% in the last 5 minutes, calculating volume in USDT preparing to buy 9.17 RLCUSDT 'NoneType' object has no attribute 'encode' preparing to buy 175.99 CTXCUSDT 'NoneType' object has no attribute 'encode' preparing to buy 0.77 TRBUSDT 'NoneType' object has no attribute 'encode'
The coins_bought.json is there but only has "{}" written in it