zyairelai / futures-hero

❗ HIGH RISK ❗ Scalping Trading on Binance Futures
165 stars 48 forks source link

I have this error - solved #11

Closed eliafino closed 3 years ago

eliafino commented 3 years ago

root@vps-a083ec93:/usr/src/futures-omax# python3.9 run.py Which pair do you want to trade?

  1. BTC_USDT
  2. ETH_USDT

Enter a number : 1 Pair Name : BTCUSDT Trade Quantity : 0.001 BTC

LIVE TRADE IS ENABLED

Traceback (most recent call last): File "/usr/src/futures-omax/run.py", line 13, in if binance_futures.position_information()[0].get('marginType') != "isolated": binance_futures.change_margin_to_ISOLATED() File "/usr/src/futures-omax/binance_futures.py", line 18, in position_information def position_information() : return client.futures_position_information(symbol=config.pair, timestamp=get_timestamp()) File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 5070, in futures_position_information return self._request_futures_api('get', 'positionRisk', True, data=params) File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 222, in _request_futures_api return self._request(method, uri, signed, True, **kwargs) File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 180, in _request kwargs['data']['signature'] = self._generate_signature(kwargs['data']) File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 135, in _generate_signature m = hmac.new(self.API_SECRET.encode('utf-8'), query_string.encode('utf-8'), hashlib.sha256) AttributeError: 'NoneType' object has no attribute 'encode'

eliafino commented 3 years ago

Ok, exported api and no problem