To submit orders for an additional user you must use the batch order submission logic, specifying the User as part of the method call:
' Get an account to submit the order for.
Dim oAccount As Account = moAccounts(0)
' Get a market to submit the order in.
Dim oMarket As Market = moFilter(0)
' Get the order submission object for our account and market.
Dim oSub As OrderList.Submission = oAccount.SubmitOrders(oMarket)
' Add the order to the list, specifying the user.
Dim oOrder As Order = oSub.Add(BuySell.Buy, _
PriceType.Market, TimeType.Normal, 1, 0, _
0, OpenClose.Undefined, "", 0, ActivationType.Immediate, "", _
0, Nothing, Nothing, True, moUser2, True)
' Submit the list of orders.
The parameters for the Add method are described here
Once generated the order will be treated the same as any other order.
To revise an order through an additional user you can either use the batch revision approach, using the AddTicks / AddPrice methods or call the Revise method on the Order object itself, in both cases specifying the User object to use to revise the order with.
To pull an order through an additional user you can either use the batch pull approach, using the Add method or call the Pull method on the Order object itself, in both cases specifying the User object to use to pull the order with.
You can use the Order.UserID, Order.Username and Order.User properties of the order to determine the user that submitted the order. The Order.User property refers directly to the User object if available, this will be ‘Nothing’ if the order was last changed by a user that is not in the API.Users list, e.g. an administrator.
NOTE: Orders that are submitted with an incorrect User and Account combination (i.e. that user does not have access to that account) will be rejected by the server. This also applies to revisions and pulls. These rejections will only be reported to the API instance that made the invalid attempt, other users that can see the account (e.g. Admins) will not see the rejection as the Submission was rejected before it got processed on the server.