IB SmartRouting Config. and API?

Discussion in 'Order Execution' started by blueskier, Jan 5, 2006.

  1. When making changes in TWS to the SmartRouting Configuration, do these changes also affect API-based quotes and executions?

    If, for example, you've excluded an exchange for SMART executions in the TWS, and you enter a SMART order via the API, does that exchange filter work with the API order, and do you still avoid the surcharge that is added to a non-SMART API order? Thanks.
     
  2. Choad

    Choad

    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
     
  3. Yes, I already know a lot about the API, but not whether all the SmartRouting Configuration stuff done in TWS automatically applies to API-based quotes and executions. I can actually see now that the quotes gotten via the API are affected, but am still interested in whether anyone has verified that the exchanges are also filtered for SMART orders, and that this occurs without any extra charge for API-based SMART orders...
     
  4. maxpi

    maxpi

    I can specify smart as the routing with Dynaorder. I never saw a mention in all the docs about TWS settings affecting things done through the API. I would guess that your API is unbundled from your TWS settings. You can test anything with a demo account BTW, the demo account is supposed to have exactly the same privileges and functionality as your real account.