I’ve trided to place new futures order in test net.
But i failed, is there any sample code to place future limit order in python/C# language?
Thanks
Here is My code
fp = "https://testnet.binancefuture.com"
params = {'symbol':'BTCUSDT','side':'BUY','type':'LIMIT','timeInForce':'GTC','quantity':'1','price':'41000','recv_window':'5000'}
query_string = urlencode(params).encode()
m = hashlib.sha256()
m.update(query_string)
query_hash = m.hexdigest()
payload = {
'access_key': public_key,
'nonce': str(uuid.uuid4()),
'query_hash': query_hash,
'query_hash_alg': 'SHA256'
}
jwt_token = jwt.encode(payload, sc_key)
authorize_token = 'Bearer {}'.format(jwt_token)
headers = {"Authorization": authorize_token}
res = requests.post(fp + "/v1/order", params=params, headers=headers)