Api spot order gets executed twice

if i place an order, via api, a buy order and sell order, order gets executed twice.
this is the code i used , i use node and use this module node-binance-api, to place orders, from this code this should occur only once but it gets executed twice and drain my assets.


binance.marketBuy(“DOGEUSDT”, (10.5 / pta).toFixed(1) , (error, response) => {
console.info(“Market Buy response”, response);
// Now you can limit sell with a stop loss, etc.
});
binance.marketSell(“DOGEBUSD”, (10.5 / pta).toFixed(1) , (error, response) => {
console.info(“Market Buy response”, response);
// Now you can limit sell with a stop loss, etc.
});

i even tried again, still gets executed twice.

Hi @kanish-111, thanks for creating this post after TG suggestion!

However it seems you use “node-binance-api”, which is not an official Binance connector, so we don’t know how is the code written there, you might want to reach out to their community or open issue in their repo issues page.

Sorry for this redirecting. If you want to use https://github.com/binance/binance-connector-node and if you run into issues related with it, then it’s something we can support better.

1 Like

thanks, will try that and get back