How to change Spot API URL to Spot Test Network URL with python?


I successfully get the the test Spot API Key and Secret. According to the guidance, the next step should be to change the Spot API URL to Spot Test Network URL. But in Python ,I don’t know where to change this parameter.

I found that there are URL parameters in the file, but the modification here is useless. What should I do?

def __init__(self, key=None, secret=None, **kwargs):

        if "base_url" not in kwargs:

            kwargs["base_url"] = ""

            # kwargs["base_url"] = ""

        super().__init__(key, secret, **kwargs)


This question should be directed to the owner of the library via Github Issues.

Thanks,i will do that!

I have solved this problem.
The api-package I downloaded before is incomplete and the client file is missing. After re-downloading through the pip install python-binance command, the test environment is built with the following code:

from binance.client import Client

client = Client(api_key, api_secret)
client.API_URL = ''