european option authentication for trade endpoints

in European options api documentation,api-key is as follows -’ dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83’- ,but it passes different value - ‘22BjeOROKiXJ3NxbR3zjh3uoGcaflPu3VMyBXAg8Jj2J1xVSnY0eB4dzacdE9IWn’- to ‘X-MBX-APIKEY’ as headers.I would really appreciate if someone could tell me how to derive ‘X-MBX-APIKEY’ value from api-key in ‘trade’ endpoints.
there is a difference in spot/future and european option trade endpoints authentication .could someone help is my code but returns ‘Unauthorized’ error:
secret = secretKey

params = {‘symbol’: symbol, ‘side’: side, ‘type’: ‘LIMIT’
, ‘timeInForce’: ‘GTC’, ‘quantity’: quantity, ‘price’: price,‘newOrderRespType’:‘RESULT’
, ‘timestamp’: int(time.time() * 1000)}
secret1 = bytes(secret.encode(‘utf-8’))
signature =, urllib.parse.urlencode(params).encode(‘utf-8’), hashlib.sha256).hexdigest()
params[‘signature’] = signature
url = ‘
data = urllib.parse.urlencode(params).encode(‘ascii’)
headers = {‘X-MBX-APIKEY’: apiKey}
req = urllib.request.Request(url, data=data, headers=headers)

response = urllib.request.urlopen(req)
response_str =‘utf-8’)
response_json = json.loads(response_str)

**i checked recvwindow and time of sending request and server time,but it is not the issue

Hello, the API Keys on the API documentation are merely for examples.
Locally, the API Key for the signature generation and ‘X-MBX-APIKEY’ header are the same.
If you’re still getting error, please specify the request URL in query string format for easier readability please.