jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.57k stars 767 forks source link

Is there a way to buy/sell coin with usdt not coin_quantity in FuturesMarketBuy/Sell? #858

Open SANGMINNNN opened 1 year ago

SANGMINNNN commented 1 year ago

I think, in binance.futureMarketBuy or binance.futureMarketSell. parameter-quantity means coin number to buy or sell. I want to get position by USDT not coin num, for example, wanna buy a 100$ worth of BTC not 0.004 BTC. Is there a way to buy/sell with USDT? Is there a function or parameter to do this?

GTedZ commented 1 year ago

I don't think they will respond, the devs haven't updated it for over a year, it's one of the reasons I started working on my own library 'binance-lib', which will support this. Of course binance doesn't support this natively, but my library is made so that these options are offered to the users, I want it to be as user-friendly as possible, there will be a function coming out tomorrow named .futuresConvertToQty() that will convert that amount to any symbol you want

You can know it's out when v2.0.0 is out