How to buy BTC by placing all available USDT

I’m using ‘node-binance-api’ and i want to place an order to buy BTC.

For ex. i have 100 USDT and i want to buy BTC for all available amount
I’ve tried binance.marketBuy("BTCUSDT", 100) but it seems that ‘100’ it always in ‘BTC’.

For Spot market orders, you may use quoteOrderQuantity = 100. For other order types or the futures exchange, you are required to calculate the conversion using the current exchange rate obtained via the Ticker endpoint.
,