const endpoint = ‘/api/v3/order/test’;
const timestamp = Date.now();
const queryString = symbol=${symbol}&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=${timestamp}
;
const signature = crypto.createHmac(‘sha256’, apiSecret).update(queryString).digest(‘hex’);
try {
const response = await axios.post(
`${apiUrl}${endpoint}?${queryString}&signature=${signature}`,
{},
{
headers: {
'X-MBX-APIKEY': apiKey
}
}
);
console.info(response.data);
} catch (error) {
console.error('Error setting futures leverage:', error);
}