Try changing the order type to Limit from market. Apparently market orders are not working for Margins as well.