I am looking for how to sell a placed order

I just ran into binance-connector-node and is been interesting…
I placed a spot buy order and I am looking for how sell off this order, but i cant seems to find any method for selling placed order.

I have tried to replaced SELL in the same newOrder request, but the response i am getting suggest that its still trying to buy responses like insufficient balance or failure because of MIN_NOTIONAL’
{client.newOrder(‘PORTOBUSD’, ‘SELL’, ‘MARKET’, {
quantity: 2
}).then(response => client.logger.log(response.data))
.catch(error => client.logger.error(error))

what is the recommended way to sell of any placed order.

The MIN_NOTIONAL error means the total value of the order that:

quantity x avgPrice of the symbol(PORTOBSUD) < MIN_NOTIONAL

The MIN_NOTIONAL of this symbols can be found from the endpoint /exchangeInfo, for now it’s about $10.

So basically you can’t place an order that value too small. For your case if you change the qty to 10, it should work.

Thanks for the response… But i am just selling what i bought whose value is now less than 10. but that is noted.

This below is the recommended way to sell off ?

client.newOrder(‘PORTOBUSD’, ‘SELL’, ‘MARKET’, {
quantity: 2
}).then(response => client.logger.log(response.data))
.catch(error => client.logger.error(error))

Here’s an example to buy and sell in spot on binance. This uses 50% of your balance to buy BTC using your USDT balance, and then it sells 100% of your purchased BTC balance - here’s a link to the part that does the sell part of the workflow: