Hi
Can anyone tell me how to liquidate all the positions of a portfolio?
I used this code and did not worked.
open_orders = get_open_orders() for order_id in open_orders: cancel_order(order_id)
Even tried to use order_target(asset, quantity, limit_price) with zero or minus the total lot buy.
Is there ant way to close all the positions in portfolio?