Hey I m trying make a STOP LOSS LIMIT order but I have this error:
binance.exceptions.BinanceAPIException: APIError(code=-2010): Stop price would trigger immediately.
That is my code:
def order():
buyOrder = client.create_order(
symbol = ‘BTCUSDT’
side = ‘SELL’,
type = ‘STOP_LOSS_LIMIT’,
quantity = 15,
price = 66000,
stopPrice = 65999,
timeInForce = ‘GTC’
)
(although why the type of the buyOrder is asociated with the python functions type, I mean it s a problem in the API ?)
Ah ok, but I change my code and still happening
buyOrder = client.create_order(
symbol = symbolTicker,
side = ‘BUY’,
type = ‘STOP_LOSS_LIMIT’,
quantity = quantity,
price = round(prev_symbolPrice1.001,8),
stopPrice = round(prev_symbolPrice1.002,8),
timeInForce = ‘GTC’
)
Illegal characters found in parameter ‘price’; legal range is ’