Need simple order example in testnet.binancefuture.com with NODE.JS

Could anyone provide 1 simple example buy order in testnet.binancefuture?

My code so far. it dosen’t work. Copied api key and secret from https://testnet.binancefuture.com/en/futures/
[Object: null prototype] {
code: -1022,
msg: ‘Signature for this request is not valid.’
}


const Binance = require('node-binance-api');
const binance = new Binance().options({
  APIKEY: '',
  APISECRET: '',
  useServerTime: true,
  test: true,
  baseURL: 'https://testnet.binancefuture.com'
});

// Place a new order
const symbol = 'BNBUSDT'; // Replace with the symbol you want to trade
const side = 'BUY'; // 'BUY' or 'SELL'
const type = 'LIMIT'; // 'LIMIT', 'MARKET', 'STOP_LIMIT', etc.
const quantity = 1; // Quantity of the asset you want to trade
const price = 350; // Price at which you want to place the order

binance.futuresOrder({
  symbol: symbol,
  side: side,
  type: type,
  quantity: quantity,
  price: price
})
  .then((response) => {
    console.log(response);
    // Handle success
  })
  .catch((error) => {
    console.error(error);
    // Handle error
  });

Hello, on Node you can just Use Mida because it’s very simple

const myAccount = await login("Binance/Spot", {
    apiKey: "***",
    apiSecret: "***",
    useTestnet: true, // for testnet
});

const myOrder = await myAccount.placeOrder({
    symbol: "BTCUSDT",
    direction: MidaOrderDirection.BUY,
    volume: 1,
});

It’s free package GitHub - Reiryoku-Technologies/Mida: The open-source and cross-platform trading framework

Seems the signature is broken for the node-binance-api package?

Here’s how to submit a usdm futures order with the most popular npm package:

Here’s how to configure the USDM Client to use testnet, instead of prod: