'How do I use an API key/secret on Binance's TestNet?

Following the instructions here, https://docs.binance.org/smart-chain/wallet/arkane.html, I created a Binance SmartChain account with its "0x" prefixed wallet address. I then added funds. What I can't figure out is how I get a TestNet API key and secret so that I can test my Python API calls. I create the client like so

from binance.client import Client
...
auth_client = Client(key, b64secret)
 if account.testing:
    auth_client.API_URL = 'https://testnet.binance.vision/api'

How do I get an API key tied to my Binance SmartChain address?



Solution 1:[1]

You have to create your API credentials from here and pass the testnet variable into the Client constructor. See the documentation.

auth_client = Client(key, b64secret, testnet=True)

does the job.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Asil