Forums

Problems encountered with a trade bot "python binance client.py"

The mistakes I get when I select a currency pair, as shown below. Please help. Coin pair: BTC Traceback (most recent call last): File "C:\Users\Q\pbm\pumpbot.py", line 159, in <module> if averagePrice == 0: averagePrice = float(client.get_avg_price(symbol=tradingPair)['price']) File "C:\Users\Q\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 888, in get_avg_price return self._get('avgPrice', data=params, version=self.PRIVATE_API_VERSION) File "C:\Users\Q\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 288, in _get return self._request_api('get', path, signed, version, kwargs) File "C:\Users\Q\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 238, in _request_api return self._request(method, uri, signed, kwargs) File "C:\Users\Q\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 233, in _request return self._handle_response() File "C:\Users\Q\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 281, in _handle_response raise BinanceAPIException(self.response) binance.exceptions.BinanceAPIException: APIError(code=-1121): Invalid symbol.

That looks like your local machine, not PythonAnywhere.

YES when I run a local machine I get these error messages. Coin pair: BTC or USD when selected I can see the quantities

I can not trade api key gives an error..

These are the forums for PythonAnywhere, an online Python development and hosting environment. While other users of our site might be able to help you out with problems you're having developing something on your own machine, you might have better luck getting an answer to a general programming problem at a programming Q&A site like Stack Overflow.

thx