New Order (TRADE),binance-connector , TEST NET

Hello. I’m trying to buy one coin for another, in the TEST NET.But the error is returned to me.
What’s wrong?
I use the "binance-connector"library.

########################################################

from binance.spot import Spot as Client

client = Client(key=’********************’,
secret=’*******************************’,
base_url=‘https://testnet.binance.vision’)
account = client.account()

client.new_order(‘BNBETH’,‘BUY’,‘MARKET’,quantity=1000.0)

ERROR:

Traceback (most recent call last):
File “C:\Users\DNS\OneDrive\Рабочий стол\Binance_api_spot\binance_spot_api.py”, line 6, in
client.new_order(‘BNBETH’,‘BUY’,‘MARKET’,quantity=1000.0)
File “C:\Users\DNS\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\spot\account.py”, line 66, in new_order
return self.sign_request(“POST”, url_path, params)
File “C:\Users\DNS\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\api.py”, line 82, in sign_request
return self.send_request(http_method, url_path, payload)
File “C:\Users\DNS\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\api.py”, line 116, in send_request
self._handle_exception(response)
File “C:\Users\DNS\AppData\Local\Programs\Python\Python38-32\lib\site-packages\binance\api.py”, line 169, in _handle_exception
raise ClientError(status_code, err[“code”], err[“msg”], response.headers)
binance.error.ClientError: (400, -1121, ‘Invalid symbol.’, {‘Content-Type’: ‘application/json;charset=UTF-8’, ‘Content-Length’: ‘38’, ‘Connection’: ‘keep-alive’, ‘Date’: ‘Thu, 23 Sep 2021 13:47:34 GMT’, ‘Server’: ‘nginx’, ‘x-mbx-uuid’: ‘9c6c7edc-74bb-4f9d-b0e8-ef35157ccbb4’, ‘x-mbx-used-weight’: ‘2’, ‘x-mbx-used-weight-1m’: ‘2’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubdomains’, ‘X-Frame-Options’: ‘SAMEORIGIN’, ‘X-Xss-Protection’: ‘1; mode=block’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Content-Security-Policy’: “default-src ‘self’”, ‘X-Content-Security-Policy’: “default-src ‘self’”, ‘X-WebKit-CSP’: “default-src ‘self’”, ‘Cache-Control’: ‘no-cache, no-store, must-revalidate’, ‘Pragma’: ‘no-cache’, ‘Expires’: ‘0’, ‘X-Cache’: ‘Error from cloudfront’, ‘Via’: ‘1.1 b917bd54ec6565658d9d65cbf075f677.cloudfront.net (CloudFront)’, ‘X-Amz-Cf-Pop’: ‘HEL50-C2’, ‘X-Amz-Cf-Id’: ‘FI2rJ_L2yplDCOvyVddi7HxL9Tk9_Au5KkhcOvUMTs1Z0OI9CDZlxw==’})
[Finished in 1.5s]

400, -1121, ‘Invalid symbol.’

There’s no “BNBETH” in Spot Testnet, you can verify the available symbols with exchangeInfo endpoint.

1 Like

Thanks! Using .exchange_info() I found out what pairs you can trade !