Closed viniciussvl closed 4 years ago
I solved the problem, first updated my version of CCXT to the latest 1.28 and finally changed the type parameter from LIMIT to STOP_LOSS_LIMIT before creating the order
I solved the problem, first updated my version of CCXT to the latest 1.28 and finally changed the type parameter from LIMIT to STOP_LOSS_LIMIT before creating the order
Hi Vinicius, I'm tying the same in python but is not working (binance {"code":-1106,"msg":"Parameter 'stopPrice' sent when not required."})
def long(self, symbol: str, amount: float, rate: float, leverage: float, ref_timestamp: datetime):
"""
Long (Futures COIN-M)
https://binance-docs.github.io/apidocs/futures/en/#new-order-trade
https://github.com/ccxt/ccxt/blob/master/examples/py/binance-futures-margin.py
https://stackoverflow.com/questions/65514350/close-position-binance-futures-with-ccxt
https://ccxt.readthedocs.io/en/latest/manual.html
"""
params = {'stopPrice': rate * 0.2, 'type': 'stopLimit'}
result = self.binance.create_order(symbol=symbol,
type='market', #market, limit
side='buy',
params=params,
amount=amount)
return result
I've tried also to change the type parameter (which should be limit/market) to STOP_LOSS_LIMIT but still doesn't not work binance {"code":-1106,"msg":"Parameter 'stopPrice' sent when not required."}
@leonardoaraujosantos hi! Answered your question here: https://github.com/ccxt/ccxt/issues/9092#issuecomment-829113246
Hello, Just now my code stopped working for no reason, it no longer creates orders of the type STOP_LOSS_LIMIT in Binance, saying that the stopPrice parameter is not mandatory, would it be a bug in the Binance API?