zyairelai / futures-hero

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

Encode #12

Closed MBillar closed 3 years ago

MBillar commented 3 years ago

Have this error:

Traceback (most recent call last): File "check.py", line 62, in try: check() File "check.py", line 60, in check else: import get_realizedPNL File "/var/www/www-root/futures-omax/get_realizedPNL.py", line 12, in trades_list = binance_futures.account_trades(midnight_timestamp) File "/var/www/www-root/futures-omax/binance_futures.py", line 12, in account_trades def account_trades(timestamp) : return client.futures_account_trades(symbol=config.pair, timestamp=get_timestamp(), startTime=timestamp) File "/usr/local/lib/python3.6/site-packages/binance/client.py", line 5078, in futures_account_trades return self._request_futures_api('get', 'userTrades', True, data=params) File "/usr/local/lib/python3.6/site-packages/binance/client.py", line 222, in _request_futures_api return self._request(method, uri, signed, True, **kwargs) File "/usr/local/lib/python3.6/site-packages/binance/client.py", line 180, in _request kwargs['data']['signature'] = self._generate_signature(kwargs['data']) File "/usr/local/lib/python3.6/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'

MBillar commented 3 years ago

Sorry. my mistake. didnt change lines with keys. if it works - u are genius:)

can u make it for 3-4 pairs at same time?

zyairelai commented 3 years ago

Kindly check the readme 3rd point, after you done the setup, open multiple terminal to run different pairs.

The screenshots is me running 4 pairs at the same time https://github.com/zyairelai/futures-omax/blob/master/screenshots/4%20Pairs%20at%20Once.jpg