1、调用币安API接口:
var message = "symbol=ETHUSDT&side=BUY&positionSide=SHORT&type=TAKE_PROFIT_MARKET&closePosition=true&stopPrice="+ticker.Last+"×tamp=" + Date.now();
var orderInfos = exchange.IO("api", "POST", "/fapi/v1/order", message);
报错信息:“{"code": -2021, "msg": "Order would immediately trigger."}”
2、直接用FMZ的exchange.Buy(-1,quantity),就不会报错。
Inventors quantify - small dreamsIt seems that the code is not quite right: What's up? var message = "symbol=" + "ETHUSDT" + "& side=BUY" + orderid +"& positionSide=SHORT" +&type="+"TAKE_PROFIT_MARKET"+"closePosition=true"+"&stopPrice="+ticker.Last+"×tamp="+Date.now(); What's up? In this case, ``ordid `` has no parameter name, only one value. ```closePosition `` has less `` and `` symbols. I recommend checking again.
Inventors quantify - small dreamsOrder would immediately trigger. This error is returned by the exchange interface, which literally means that the parameters should be set incorrectly, which will result in the order being settled directly.
The wind shadow 1124When the market price reaches the calculated stop loss price, Exchange.IO calls the TAKE_PROFIT_MARKET type to stop the market price, and reports: Order would immediately trigger. But the FMZ API can be used to make transactions immediately, without any errors, as follows: exchange.SetDirection (("closebuy"); exchange.Sell ((-1, quantity);
Inventors quantify - small dreamsThe exchange.IO calls do not need to pass on parameters for participatory signatures such as timestamps. See specific error messages.
The wind shadow 1124This is the latest update. This is a list of all the different ways ETHUSDT is credited in the database.