Error setting futures leverage: Request failed with status code 404

Hi there
Below returns error. What is wrong with the code ? Please help
Error setting futures leverage: Request failed with status code 404

const axios = require(‘axios’);
const crypto = require(‘crypto’);
require(‘dotenv’).config();

const apiKey = process.env.BINANCE_API_KEY;
const apiSecret = process.env.BINANCE_API_SECRET;
const apiUrl = ‘https://testnet.binance.vision’;

async function setFuturesLeverage(symbol, leverage) {
const endpoint = ‘/api/v3/order/test/’;
const timestamp = Date.now();
//const queryString = symbol=${symbol}&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2&timestamp=${timestamp};
const queryString = symbol=${symbol}&side=SELL&type=LIMIT&timestamp=${timestamp};
const signature = crypto.createHmac(‘sha256’, apiSecret).update(queryString).digest(‘hex’);

console.log( `${apiUrl}${endpoint}?${queryString}&signature=${signature}`);

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.message);
}
}

setFuturesLeverage(‘ETHUSDT’, 50);

Error setting futures leverage: Request failed with status code 404

Hey,
It appears that you’re sending a LIMIT order without providing the timeInForce, quantity, and price parameters. (You commented the line that includes all the required parameters.)

Please refer to the documentation for the mandatory parameters needed for each order type: Binance API Documentation