I tried to monitor the order status with order_target_percent
,but it did not work as expected. Help plz.
I tried to monitor the order status with order_target_percent
,but it did not work as expected. Help plz.
Not sure what you expected. Your code seems to work. The 'rebalance' method is scheduled to run 1 hour after market open (ie 9:30 Central time which my logs are in). Here is the log...
2017-08-17 09:30 handle_data:33 INFO error order id
2017-08-17 09:31 handle_data:31 INFO 1
At, and before 9:30, there are no orders so an error is raised. At 9:30 and order is placed and filled immediately. At 9:31 the order shows a status of 1 which means filled.