Stop Limit Orders on Python

Hello,

I need to place Stop Limit orders in python, does anybody knows where can I get information?

Regards,

Orlando Gautier

Do you got put Stop Limit with python?

The reason is the stopPrice < last price, then order can be triggered immediately.
Here is a tutorial talking about this, hope it will be helpful.

do you wish to place order by SDK or pure python, very limited info, can’t help.

Pure Python! but if there are SDK info, it would be nice!

I’m sending the fallowing parameters:

params = {
“symbol”: “SXPUSDT”,
“side”: “SELL”,
“type”: “STOP”,
“timeInForce”:“GTC”,
“quantity”: 7,
“price”: 2.98,
“stopPrice”: 3.01,
#“closePosition”: “false”,
“positionSide”: “LONG”,
“recvWindow”:“20000”

}
response = send_signed_request(‘POST’, ‘/fapi/v1/order’, params)
print(response)

I get this message:

{‘code’: -2021, ‘msg’: ‘Order would immediately trigger.’}

Do you know why?

Regards,

Orlando Gautier

1 Like