edit: just reread your post and it seems that you are asking if TWS can override the specified exchange for API orders? I guess I don't know that. Never tried, but I would assume not.
You can specify which exchange in your API orderline.
Mine is hard-coded to Smart and I have had no reason to change. Works fine for me.
Exmple ActiveX:
Method
void placeOrder(long id, String action, long quantity, String symbol, String secType, String expiry, double strike, String right,String multiplier, String exchange, String currency, String orderType, double lmtprice, double auxPrice, String goodAfterTime, String faGroup, String faMethod, String faPercentage, String faProfile, String goodTillDate) See Extended Order Attributes.
Parameters
id - the order id. You must specify a unique value. When the order status returns, it will be identified by this tag. This tag is also used when canceling the order.
action - identifies the side. Valid values are:
BUY
SELL
SSHORT
quantity - The order quantity.
symbol - the symbol of the underlying asset.
secType - the security type. Valid values are:
STK
OPT
FUT
FOP
CASH
expiry - the expiration date. Use the format YYYYMM.
strike - the strike price
right - specifies a Put or Call. Valid values are: P, PUT, C, CALL.
multiplier - allows you to specify a futures or options multiplier in cases where multiple possibilities exist.
exchange - the order destination, such as Smart.
currency - specifies the currency. Ambiguities may require that this field be specified, for example, when SMART is the exchange and IBM is being requested (IBM can trade in GBP or USD). Given the existence of this kind of ambiguity, it is a good idea to always specify the currency.
orderType - identifies the order type. Valid values are:
MKT
MKTCLS
LMT
LMTCLS
PEGMKT
STP
STPLMT
TRAIL
REL
VWAP
lmtPrice - the LIMIT price, used for limit, stop-limit and relative orders. In all other cases specify zero. For relative orders with no limit price, also specify zero.
auxPrice - identifies the STOP price for stop-limit orders, and the offset amount for relative orders. In all other cases, specify zero.
goodAfterTime - specifies that the order becomes active after the time set. Send an empty string if not applicable.
faGroup - specifies the order's "Financial Advisor Group." Send an empty string if not an FA.
faMethod - specifies the order's "Financial Advisor Allocation Method." Send an empty string if not an FA.
faPercentage - specifies the order's "Financial Advisor Percentage." Send an empty string if not an FA.
faProfile - specifies the order's "Financial Advisor Profile." Send an empty string if not an FA.
goodTillDate - specifies the order's "Good Till Date." Send an empty string if not applicable.
Notes
Call this method to place an order. The order status will be returned by the orderStatus event. For more details see Active X Properties