Anybody using backtrader to live-trade on Binance? Problem with bracket orders.
This Library is suggested one the website.
The data-connection works fine and normal market orders as well.
But for stop-orders I get this strange error that all required parameters are not set, stopPrice in the case STOP/TAKE_PROFIT, even though they are.
I went through the traceback and I found that the broker has this in the code:
try: # all params are exchange specific: https://github.com/ccxt/ccxt/wiki/Manual#custom-order-params params['created'] = created # Add timestamp of order creation for backtesting ret_ord = self.store.create_order(symbol=data.p.dataname, order_type=order_type, side=side, amount=amount, price=price, params=params) except: # save some API calls after failure self.use_order_params = False return None
If an error occurs it returns None and then sets the class variable use_order_params to False, which means additional parameters are not used anymore which leads to the error. It makes it impossible to debug what went wrong in the first call.
Anybody dealt with the STOP/TAKE_PROFIT ? It seems like a limitation of bt-ccxt.