I used binance api node in my code (https://github.com/binance-exchange/binance-api-node)
I wrote javascript code that buy any coin in binance api.
It is working but I am looking for something like stop loss. Opposite of stop loss, like take profit.<br
For example;
Any coin bought at 5 USD. Meanwhile, I want to give a SELL order at 6 USD within BUY order or somewhere.
According to Binance API Document;
Order types (orderTypes, type):
1- LIMIT,
2- MARKET,
3- STOP_LOSS,
4- STOP_LOSS_LIMIT,
5- TAKE_PROFIT,
6- TAKE_PROFIT_LIMIT,
7- LIMIT_MAKER
This is my code;
await client.order({
symbol: coin_name,
side: 'BUY',
type: ' ', // how can i use something like take profit ?
quantity: (amount/lastPrice).toFixed(3), // max precision is 3 ?
price: lastPrice.toFixed(3),
//stopPrice property could be use as take_profit?
});
When I try to execute "type: TAKE_PROFIT", compile gives an error;
Error message: "Take profit orders are not supported for this symbol."
Error Description: TAKE_PROFIT is not enabled on the symbol
https://api.binance.com/api/v3/exchangeInfo, I search that response json.
There are just 5 types of order type but there is no TAKE_PROFIT as an order type.