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 me.here 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 = hmac.new(secret1, urllib.parse.urlencode(params).encode(‘utf-8’), hashlib.sha256).hexdigest()
params[‘signature’] = signature
url = ‘https://eapi.binance.com/eapi/v1/order’
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 = response.read().decode(‘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