node-binance-api icon indicating copy to clipboard operation
node-binance-api copied to clipboard

Bad request error on marketSell

Open valeriagrazzini opened this issue 3 years ago • 2 comments

Hi, when I try to execute this example I get the response 400 bad request

ticker = 'RAREUSDT' quantity = 16

async placeSellOrder(ticker, quantity) { return new Promise((resolve, reject) => { this.binance.marketSell(ticker, quantity, (error, response) => { if(error) { console.log('ERROR', error.statusMessage, error.statusCode) reject(error) } else { console.info("Market Sell response", response); resolve(response) } }); }) }

valeriagrazzini avatar Dec 27 '21 13:12 valeriagrazzini

I have the same issue

K4L231 avatar Jan 19 '22 11:01 K4L231

There could be two reasons. First, sync your computer's date and time. Second, when placing the sell order, give it as an integer (For example, 29 XRP, not 29.96 XRP)

arifw3 avatar Jun 05 '23 01:06 arifw3