Sometimes stop order will auto change to limit order

i use node.js and axios, i found sometimes stop order will auto change to limit order, in API response & order history it’s stop order, but in current orders it’s limit order.
And sometimes take profit order will also have this problem.
The frequency is not certain, it happens about once every twenty times.
Is there any solution?

Hi @Rui_Sheng_Xu,

To have a better understanding of your situation, please provide a practical example, i.e, share the request params (omit sensitive fields), its respective raw response, and raw responses from current open order and order history. If such are not provided, we don’t have enough context and we’ll assume that error is likely in your code setup.

API path /fapi/v1/order

Take profit params

{
  symbol,
  side: "SELL",
  type: "TAKE_PROFIT",
  timeInForce: "GTE_GTC",
  quantity,
  price: takeProfitPrice,
  stopPrice: takeProfitPrice,
  timestamp: Date.now()
}

Stop loss params

{
  symbol,
  side: "SELL",
  type: "STOP",
  timeInForce: "GTE_GTC",
  quantity,
  price: stopLossPrice,
  stopPrice: stopLossPrice,
  timestamp: Date.now()
}

Regarding the API response, current open orders and order history, etc., because this problem only occurs occasionally, I can’t provide records for the time being.

If want to know more information, I have open sourced my code

The code related to placing an order is in src/trade.js

When it happens, try to use orderId or clientOrderId to see if it’s indeed the same order at /fapi/v1/order and /fapi/v1/openOrder responses.