refactors margin order placement