I'm running an algorithm to predict prices and enter trades for me using the ccxt API in python. I wish to execute a trailing stop loss order and I enter such a long position like this:
exchange = ccxt.binance({
'enableRateLimit': True,
'apiKey': '*****',
'secret': '*****'
})
exchange.load_markets()
exchange.create_order('MKR/USDT, 'TRAILING_STOP_MARKET', 'buy', exchange.fetch_balance()['USDT']['free']/exchange.fetch_ticker('MKR/USDT)['last'], None, params = {'callbackRate': 1})
but I get the following error:
ccxt.base.errors.InvalidOrder: binance TRAILING_STOP_MARKET is not a valid order type in spot market MKR/USDT
I'm not sure why thought because I'm pretty sure binance supports trailing stop loss orders (it says so in its own API documentation).