I’m trying to get withdrawal fees but get this error. This is my code:
import requests
Your Binance API Key and Secret (keep these secure)
api_key = ‘’ # here i put my api_key
Binance API endpoint for asset configuration
url = ‘https://api.binance.com/sapi/v1/capital/config/getall’
Set up headers with API Key
headers = {
‘X-MBX-APIKEY’: api_key
}
Send a GET request to the endpoint with headers
response = requests.get(url, headers=headers)
data = response.json()
data prints {‘code’: -1002, ‘msg’: ‘You are not authorized to execute this request.’}. What am I doing wrong? Also, is there another way to get withdrawal fees?