import logging
from configparser import ConfigParser
from binance.spot import Spot as Client
from binance.lib.utils import config_logging
config_logging(logging, logging.DEBUG)
spot_client = Client(base_url=“https://testnet.binance.vision”)
logging.info(spot_client.ticker_price(“OPUSDT”))
ERROR: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, 22 Dec 2022 01:13:36 GMT’, ‘Server’: ‘nginx’, ‘x-mbx-uuid’: ‘55786bd3-52a2-4dc3-91db-e4aed5f58409’, ‘x-mbx-used-weight’: ‘1’, ‘x-mbx-used-weight-1m’: ‘1’, ‘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 81f818adbacff6b703252be1c8922598.cloudfront.net (CloudFront)’, ‘X-Amz-Cf-Pop’: ‘SFO5-P1’, ‘X-Amz-Cf-Id’: ‘7V_XUkm4DQ4ODYD8dC7yHvshPYMR8f6qDr7Omh3l4XZHSsB0mbCDeA==’})