Hi all,
I tried creating the below orders:
client.futures_create_order(
symbol=‘BTCUSDT’,
side=‘BUY’,
type=‘MARKET’,
quantity=1,
isIsolated=‘true’,
)
client.futures_create_order(
symbol=‘BTCUSDT’,
side=‘SELL’,
type=‘TRAILING_STOP_MARKET’,
timeInForce=‘GTC’,
quantity=1,
callbackRate= 1.3,
isIsolated=‘true’,
reduceOnly=‘true’,
)
The market order places fine, but the trailing stop is cancelled immediately. The same happens when I try via the UI. Could you let me know what I’m doing wrong?
Hello, I don’t know what was the latest price at the time of your order posting, but hopefully the following excerpt from the API documentation (https://binance-docs.github.io/apidocs/futures/en/#new-order-trade) helps you:
For TRAILING_STOP_MARKET, if you got such error code.
{“code”: -2021, “msg”: “Order would immediately trigger.”}
means that the parameters you send do not meet the following requirements:
BUY: activationPrice should be smaller than latest price.
SELL: activationPrice should be larger than latest price.
Hi there,
So I tried the exact same thing in my original post today… and it worked. My guess was Binance was having issues at the time of trying. Consistently working now.
Thanks for your help anyways!
Cheers