Nothing being defined when using binance api package

const config = require('./config.json')
const Binance = require('node-binance-api');
const binance = new Binance().options({
  APIKEY: config.apikey,
  APISECRET: config.apisecret,
});
var clc = require("cli-color");
var prompt = require('prompt-sync')();
console.log(clc.green(`

                    
etcccc                   
                 
 

`))

const test = prompt('> ')
async () => {
const balance = await binance.futuresPrices()
}

if (test === 'balance') {
console.info(balance)
}

I’m trying to use a package for the api on javascript (npm), but i get a error saying balance is not defined and using my ide (visual studio code) to hover over futuresPrices(), it shows ‘any’ which means it isnt defined i think. Is there any way to fix this?

Wrong way of using nodeJS. Just run binance.futuresPrices().then(resp=>console.log(resp)) and you’d know the API-related part is working. For the rest of them, please go to a nodeJS dev group to ask