求TWS控件的资料

Discussion in 'Interactive Brokers(盈透)' started by zeroboss, Oct 27, 2007.

  1. 想用IB提供的API进行二次开发。IB提供了一个TWS.OCX的控件,但是找遍了IB的网站也没有发现这个控件的相关资料。比如,控件内建的事件、方法、变量等。哪位用过其开发自己的策略支持程序能不能说说。
     
  2. 看tws-user-guide.pdf
    在IB有下载的
    Application Program Interface

    ActiveX
    Link to the application using ActiveX
    Before you can use third-party ActiveX controls, you must register them with Visual Basic.
    To link using the ActiveX control and VB, VBA or C++
    1. Drop the application control onto a form or dialog box.
    2. Call the following methods:
    • Call the connect() method to connect to the running aplication.
    • Call the methods you need to perform whatever operations you require, such
    as the reqMktData() method to request market data.
    3. Call the placeOrder() method to place an order. Orders using extended attributes
    require that ActiveX properties representing them be set first.
    4. Handle the following events:
    • Handle the nextValidId() event to receive the next available valid order ID.
    Increment the ID by one for successive orders.
    • Handle the tickPrice() and tickSize() events to receive the market data.
    • Handle the orderStatus() event to receive status information about orders.
    • Handle the error() event to receive error information.
    • Handle the connectionClosed() event to be notified in case the application
    stops communicating with the ActiveX control.


    这个文档里面也有事件、方法、变量的详细介绍
     
  3. ok,感谢