I want to place a "stop limit order" using CCXT module in python. The stop price dictates the price whether the order is triggered, then the limit price dictates the price at which the order is filled. Here is the code I have. However, the create_order function returns an error saying "createOrder() has failed, check your arguments and parameters"
client = ccxt.coinbase({
'apiKey': config.coinbase_API_key,
'secret': config.coinbase_API_secret,
'password': config.password})
symbol = 'ADA/USDT'
order_type = 'limit'
side = 'buy'
amount = 10
order_price = 0.45 # limit order (i.e., limit price)
params = {
'triggerPrice': 0.43, # trigger stop price to execute an order
'stopDirection' : 'STOP_DIRECTION_STOP_UP',
'timeInForce': 'GTC'
}
client.create_order(symbol, order_type, side, amount, order_price, params)