What I'd like to do: Enter using a limit order that expires after  minutes. Attach a stop loss. Exit automatically after  hours using a market order (which would cancel the stop loss). Ideally, this would be transmitted in one go to minimize risk from disconnects. I'm looking into IB's API to do this. Per title, seems I can get close using a bracket order, but with a time-based (GAT) profit taking order on the up side instead of a traditional limit order. Concerns: Does the API force the profit taking order to be a limit order, or can I submit another order type such as a GAT? If entering limit order is partially filled and expires, ideally bracketing orders would be active and have sizes adjusted to match filled size. My fears are that: bracketing orders will not activate till parent fills completely bracketing order sizes will not be adjusted to reflect parent's partial fill bracketing orders will be canceled on parent expiry. Seems like basic stuff, but just want to make sure I understand brackets correctly. Would love some input if anyone has experience with this. If not with a bracket order, is this doable with a parentId for the entering limit order + OCA group for the bracketing orders? (Again, not sure bracketing orders would adjust size in case of partial fills of parent.) Thank you.