API Beta Notes The enhancements and modifications below are in build 9.4 of the TWS API. This API release requires TWS server version 38 (TWS release 878). Please note that API 9.4 will disconnect immediately if a TWS version older than 878 is detected. Some features below will only work with TWS version 879, which is currently in beta. API 9.4 requires Windows NT 4.0 SP3 or later. For clarification on any of the items listed, refer to the appropriate section in the Users Guide, or send us an email at Beta Support. Enhancements What-If Support for Socket/ActiveX APIs What-if support was added, including OrderState object for openOrder callback. The user can set a "what-if" boolean on an order and get back margins/commission info. Commissions relayed to Socket/ActiveX API Clients The openOrder callback will now be invoked each time TWS receives commissions information for a trade. Fields Moved Between Contract and ContractDetails Class/Struct * The BOND-specific fields have been moved from Contract to ContractDetails * The Multiplier field has been removed from ContractDetails. It already exists in Contract and has been left there. * The ConId field has been moved from ContractDetails to Contract. This enables support for security definition by conId requests. Deprecated Property Removed The previously deprecated Order::sharesAllocation property has been removed. ActiveX Control Significantly Refactored In ActiveX, we are now mimicking the Socket interfaces so that for each class (struct) we now have a COM interface (object) with the same set of properties, which is being passed to a corresponding request (callback). This replaces a callback method that takes 70+ parameters with a callback method that takes a couple of objects, and allows us to support all the features for VB6 clients. The following "Ex" requests have been added (dispinterface _DTws): [id(100)] void reqContractDetailsEx(IContract* contract); [id(101)] void reqMktDataEx(LONG tickerId, IContract* contract, BSTR genericTicks, BOOL snapshot); [id(102)] void reqMktDepthEx(LONG tickerId, IContract* contract, LONG numRows); [id(103)] void placeOrderEx(LONG orderId, IContract* contract, IOrder* order); [id(104)] void reqExecutionsEx(IExecutionFilter* filter); [id(105)] void exerciseOptionsEx(LONG tickerId, IContract* contract, LONG exerciseAction, LONG exerciseQuantity, BSTR account, LONG override); [id(106)] void reqHistoricalDataEx(LONG tickerId, IContract* contract, BSTR endDateTime, BSTR duration, BSTR barSize, BSTR whatToShow, BOOL useRTH, LONG formatDate); [id(107)] void reqRealTimeBarsEx(LONG tickerId, IContract* contract, LONG barSize, BSTR whatToShow, BOOL useRTH); [id(108)] void reqScannerSubscriptionEx(LONG tickerId, IScannerSubscription* subscription); The following "Ex" callbacks have been added (dispinterface _DTwsEvents): [id(100)] void contractDetailsEx(IContractDetails* contractDetails); [id(101)] void openOrderEx(LONG orderId, IContract* contract, IOrder* order, IOrderState* orderState); [id(102)] void execDetailsEx(LONG orderId, IContract* contract, IExecution* execution); [id(103)] void updatePortfolioEx(IContract* contract, LONG position, DOUBLE marketPrice, DOUBLE marketValue, DOUBLE averageCost, DOUBLE unrealizedPNL, DOUBLE realizedPNL, BSTR accountName); [id(104)] void scannerDataEx(LONG reqId, LONG rank, IContractDetails* contractDetails, BSTR distance, BSTR benchmark, BSTR projection, BSTR legsStr); Note: Non-Ex counterparts of the requests/callbacks above have been deprecated and will be removed soon. Clients are urged to update their software to use the new interface. The following factory methods have been introduced (dispinterface _DTws): [id(200)] IContract* createContract(void); [id(201)] IComboLegList* createComboLegList(void); [id(202)] IOrder* createOrder(void); [id(203)] IExecutionFilter* createExecutionFilter(void); [id(204)] IScannerSubscription* createScannerSubscription(void); Note: The factory methods listed above are the only supported way to create newly introduced I* COM objects. Note: Once created by a factory, COM objects are tied to a corresponding TWS COM object. One should not try to pass them to another TWS COM objects instance, as this might cause undefined behavior. New scannerDataEnd Method Added for Socket and ActiveX API The method/callback is called once a full snapshot of a scanner window is received. OutsideRTH Support in All API Platforms This new order flag replaces ignoreRTH and rthOnly. IBExecution Customers: Away and PTA Orders Supported (requires TWS 879) Two new extended order attributes have been added in support of IBExecution customers: * clearingIntent: Valid values include: IB, Away, PTA. * clearingAccount: The true beneficiary of the order.This value is required to be sent on FUT/FOP orders for reporting to the exchange. © 2001 Interactive Brokers LLC. All rights reserved. Sun, Sun Microsystems, the Sun Logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Excel is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries.