The initial codes for the IB tws api request events are listed in Table 4.1.

Table 4.1: IB tws api request names and codes
Tag Description Class name
1 request market data ReqMktData
2 cancel market data EndMktData
3 place order PlaceOrder
4 cancel order CancelOrder
5 request open orders OpenOrders
6 request account data AccountData
7 request executions Executions
8 request next id RequestIds
9 request contract data ReqConData
10 request market depth ReqMktBook
11 cancel market depth EndMktBook
12 request news bulletins ReqBulletin
13 cancel news bulletins EndBulletin
14 set IB tws log level SetLogLevel
15 request auto open orders AutoOpens
16 request all open orders AllOpens
17 request managed accounts ManagedAccts
18 request financial advisors FinAdvisor
19 replace financial advisor ReplaceFa
20 request historical data ReqHistory
21 exercise options ExerciseOpts
22 request market scan ReqScanSub
23 cancel market scan EndScanSub
24 request scan parameters ReqScanParms
25 cancel historical data EndHistory

Bill Pippin 2010-01-14