Attachment 'ibapisummary.txt'

Download

   1 ## Please edit system and help pages ONLY in the moinmaster wiki! For more
   2 ## information, please see MoinMaster:MoinPagesEditorGroup.
   3 ##master-page:CategoryTemplate
   4 ##master-date:Unknown-Date
   5 #format wiki
   6 #language en
   7 
   8 [[TableOfContents]]
   9 
  10 {{{#!java
  11 
  12 tickPrice(int, int, double, int)
  13 tickSize(int, int, int)
  14 tickOptionComputation(int, int, double, double, double, double)
  15 tickGeneric(int, int, double)
  16 tickString(int, int, String)
  17 tickEFP(int, int, double, String, double, int, String, double, double)
  18 orderStatus(int, String, int, int, double, int, int, double, int, String)
  19 openOrder(int, Contract, Order, OrderState)
  20 updateAccountValue(String, String, String, String)
  21 updatePortfolio(Contract, int, double, double, double, double, double, String)
  22 updateAccountTime(String)
  23 nextValidId(int)
  24 contractDetails(ContractDetails)
  25 bondContractDetails(ContractDetails)
  26 execDetails(int, Contract, Execution)
  27 updateMktDepth(int, int, int, int, double, int)
  28 updateMktDepthL2(int, int, String, int, int, double, int)
  29 updateNewsBulletin(int, int, String, String)
  30 managedAccounts(String)
  31 receiveFA(int, String)
  32 historicalData(int, String, double, double, double, double, int, int, double, boolean)
  33 scannerParameters(String)
  34 scannerData(int, int, ContractDetails, String, String, String, String)
  35 scannerDataEnd(int)
  36 realtimeBar(int, long, double, double, double, double, long, double, int)
  37 currentTime(long)
  38 
  39 public interface EWrapper extends AnyWrapper {
  40 
  41     void tickPrice( int tickerId, int field, double price, int canAutoExecute);
  42     void tickSize( int tickerId, int field, int size);
  43     void tickOptionComputation( int tickerId, int field, double impliedVol,
  44     		double delta, double modelPrice, double pvDividend);
  45 	void tickGeneric(int tickerId, int tickType, double value);
  46 	void tickString(int tickerId, int tickType, String value);
  47 	void tickEFP(int tickerId, int tickType, double basisPoints,
  48 			String formattedBasisPoints, double impliedFuture, int holdDays,
  49 			String futureExpiry, double dividendImpact, double dividendsToExpiry);
  50     void orderStatus( int orderId, String status, int filled, int remaining,
  51             double avgFillPrice, int permId, int parentId, double lastFillPrice,
  52             int clientId, String whyHeld);
  53     void openOrder( int orderId, Contract contract, Order order, OrderState orderState);
  54     void updateAccountValue(String key, String value, String currency, String accountName);
  55     void updatePortfolio(Contract contract, int position, double marketPrice, double marketValue,
  56             double averageCost, double unrealizedPNL, double realizedPNL, String accountName);
  57     void updateAccountTime(String timeStamp);
  58     void nextValidId( int orderId);
  59     void contractDetails(ContractDetails contractDetails);
  60     void bondContractDetails(ContractDetails contractDetails);
  61     void execDetails( int orderId, Contract contract, Execution execution);
  62     void updateMktDepth( int tickerId, int position, int operation, int side, double price, int size);
  63     void updateMktDepthL2( int tickerId, int position, String marketMaker, int operation,
  64     		int side, double price, int size);
  65     void updateNewsBulletin( int msgId, int msgType, String message, String origExchange);
  66     void managedAccounts( String accountsList);
  67     void receiveFA(int faDataType, String xml);
  68     void historicalData(int reqId, String date, double open, double high, double low,
  69                       double close, int volume, int count, double WAP, boolean hasGaps);
  70     void scannerParameters(String xml);
  71     void scannerData(int reqId, int rank, ContractDetails contractDetails, String distance,
  72     		String benchmark, String projection, String legsStr);
  73     void scannerDataEnd(int reqId);
  74     void realtimeBar(int reqId, long time, double open, double high, double low, double close, long volume, double wap, int count);
  75     void currentTime(long time);
  76 }
  77 }}}
  78 
  79 == Contract Details ==
  80 
  81 {{{#!java
  82 public class ContractDetails {
  83     public ContractDetails( Contract p_summary, String p_marketName, String p_tradingClass,
  84     		double p_minTick, String p_orderTypes, String p_validExchanges) {
  85         m_summary = p_summary;
  86     	m_marketName = p_marketName;
  87     	m_tradingClass = p_tradingClass;
  88     	m_minTick = p_minTick;
  89     	m_orderTypes = p_orderTypes;
  90     	m_validExchanges = p_validExchanges;
  91     }
  92 }
  93 m_summary : Contract
  94 m_marketName : String
  95 m_tradingClass : String
  96 m_minTick : double
  97 m_priceMagnifier : int
  98 m_orderTypes : String
  99 m_validExchanges : String
 100 m_cusip : String
 101 m_ratings : String
 102 m_descAppend : String
 103 m_bondType : String
 104 m_couponType : String
 105 m_callable : boolean
 106 m_putable : boolean
 107 m_coupon : double
 108 m_convertible : boolean
 109 m_maturity : String
 110 m_issueDate : String
 111 m_nextOptionDate : String
 112 m_nextOptionType : String
 113 m_nextOptionPartial : boolean
 114 m_notes : String
 115 ContractDetails()
 116 ContractDetails(Contract, String, String, double, String, String)
 117 }}}
 118 
 119 == Contract ==
 120 
 121 {{{#!java
 122 m_conId : int
 123 m_symbol : String
 124 m_secType : String
 125 m_expiry : String
 126 m_strike : double
 127 m_right : String
 128 m_multiplier : String
 129 m_exchange : String
 130 m_currency : String
 131 m_localSymbol : String
 132 m_primaryExch : String
 133 m_includeExpired : boolean
 134 m_comboLegsDescrip : String
 135 m_comboLegs : Vector
 136 Contract()
 137 clone()
 138 Contract(int, String, String, String, double, String, String, String, String, String, Vector, String, boolean)
 139 equals(Object)
 140 }}}
 141 
 142 == Combo Leg ==
 143 
 144 {{{#!java
 145 SAME : int
 146 OPEN : int
 147 CLOSE : int
 148 UNKNOWN : int
 149 m_conId : int
 150 m_ratio : int
 151 m_action : String
 152 m_exchange : String
 153 m_openClose : int
 154 m_shortSaleSlot : int
 155 m_designatedLocation : String
 156 ComboLeg()
 157 ComboLeg(int, int, String, String, int)
 158 ComboLeg(int, int, String, String, int, int, String)
 159 equals(Object)
 160 }}}
 161 
 162 == EClient Socket ==
 163 
 164 {{{#!java
 165 CLIENT_VERSION : int
 166 SERVER_VERSION : int
 167 EOL : byte[]
 168 BAG_SEC_TYPE : String
 169 GROUPS : int
 170 PROFILES : int
 171 ALIASES : int
 172 faMsgTypeName(int)
 173 REQ_MKT_DATA : int
 174 CANCEL_MKT_DATA : int
 175 PLACE_ORDER : int
 176 CANCEL_ORDER : int
 177 REQ_OPEN_ORDERS : int
 178 REQ_ACCOUNT_DATA : int
 179 REQ_EXECUTIONS : int
 180 REQ_IDS : int
 181 REQ_CONTRACT_DATA : int
 182 REQ_MKT_DEPTH : int
 183 CANCEL_MKT_DEPTH : int
 184 REQ_NEWS_BULLETINS : int
 185 CANCEL_NEWS_BULLETINS : int
 186 SET_SERVER_LOGLEVEL : int
 187 REQ_AUTO_OPEN_ORDERS : int
 188 REQ_ALL_OPEN_ORDERS : int
 189 REQ_MANAGED_ACCTS : int
 190 REQ_FA : int
 191 REPLACE_FA : int
 192 REQ_HISTORICAL_DATA : int
 193 EXERCISE_OPTIONS : int
 194 REQ_SCANNER_SUBSCRIPTION : int
 195 CANCEL_SCANNER_SUBSCRIPTION : int
 196 REQ_SCANNER_PARAMETERS : int
 197 CANCEL_HISTORICAL_DATA : int
 198 REQ_CURRENT_TIME : int
 199 REQ_REAL_TIME_BARS : int
 200 CANCEL_REAL_TIME_BARS : int
 201 MIN_SERVER_VER_REAL_TIME_BARS : int
 202 MIN_SERVER_VER_SCALE_ORDERS : int
 203 MIN_SERVER_VER_SNAPSHOT_MKT_DATA : int
 204 MIN_SERVER_VER_SSHORT_COMBO_LEGS : int
 205 MIN_SERVER_VER_WHAT_IF_ORDERS : int
 206 MIN_SERVER_VER_CONTRACT_CONID : int
 207 MIN_SERVER_VER_PTA_ORDERS : int
 208 m_anyWrapper : AnyWrapper
 209 m_socket : Socket
 210 m_dos : DataOutputStream
 211 m_connected : boolean
 212 m_reader : EReader
 213 m_serverVersion : int
 214 m_TwsTime : String
 215 serverVersion()
 216 TwsConnectionTime()
 217 wrapper()
 218 reader()
 219 EClientSocket(AnyWrapper)
 220 isConnected()
 221 eConnect(String, int, int)
 222 connectionError()
 223 checkConnected(String)
 224 createReader(EClientSocket, DataInputStream)
 225 eConnect(Socket, int)
 226 eDisconnect()
 227 cancelScannerSubscription(int)
 228 reqScannerParameters()
 229 reqScannerSubscription(int, ScannerSubscription)
 230 reqMktData(int, Contract, String, boolean)
 231 cancelHistoricalData(int)
 232 cancelRealTimeBars(int)
 233 reqHistoricalData(int, Contract, String, String, String, String, int, int)
 234 reqRealTimeBars(int, Contract, int, String, boolean)
 235 reqContractDetails(Contract)
 236 reqMktDepth(int, Contract, int)
 237 cancelMktData(int)
 238 cancelMktDepth(int)
 239 exerciseOptions(int, Contract, int, int, String, int)
 240 placeOrder(int, Contract, Order)
 241 reqAccountUpdates(boolean, String)
 242 reqExecutions(ExecutionFilter)
 243 cancelOrder(int)
 244 reqOpenOrders()
 245 reqIds(int)
 246 reqNewsBulletins(boolean)
 247 cancelNewsBulletins()
 248 setServerLogLevel(int)
 249 reqAutoOpenOrders(boolean)
 250 reqAllOpenOrders()
 251 reqManagedAccts()
 252 requestFA(int)
 253 replaceFA(int, String)
 254 reqCurrentTime()
 255 }}}
 256 
 257 == Order ==
 258 {{{#!java
 259 CUSTOMER : int
 260 FIRM : int
 261 OPT_UNKNOWN : char
 262 OPT_BROKER_DEALER : char
 263 OPT_CUSTOMER : char
 264 OPT_FIRM : char
 265 OPT_ISEMM : char
 266 OPT_FARMM : char
 267 OPT_SPECIALIST : char
 268 AUCTION_MATCH : int
 269 AUCTION_IMPROVEMENT : int
 270 AUCTION_TRANSPARENT : int
 271 EMPTY_STR : String
 272 m_orderId : int
 273 m_clientId : int
 274 m_permId : int
 275 m_action : String
 276 m_totalQuantity : int
 277 m_orderType : String
 278 m_lmtPrice : double
 279 m_auxPrice : double
 280 m_tif : String
 281 m_ocaGroup : String
 282 m_ocaType : int
 283 m_orderRef : String
 284 m_transmit : boolean
 285 m_parentId : int
 286 m_blockOrder : boolean
 287 m_sweepToFill : boolean
 288 m_displaySize : int
 289 m_triggerMethod : int
 290 m_outsideRth : boolean
 291 m_hidden : boolean
 292 m_goodAfterTime : String
 293 m_goodTillDate : String
 294 m_overridePercentageConstraints : boolean
 295 m_rule80A : String
 296 m_allOrNone : boolean
 297 m_minQty : int
 298 m_percentOffset : double
 299 m_trailStopPrice : double
 300 m_faGroup : String
 301 m_faProfile : String
 302 m_faMethod : String
 303 m_faPercentage : String
 304 m_openClose : String
 305 m_origin : int
 306 m_shortSaleSlot : int
 307 m_designatedLocation : String
 308 m_discretionaryAmt : double
 309 m_eTradeOnly : boolean
 310 m_firmQuoteOnly : boolean
 311 m_nbboPriceCap : double
 312 m_auctionStrategy : int
 313 m_startingPrice : double
 314 m_stockRefPrice : double
 315 m_delta : double
 316 m_stockRangeLower : double
 317 m_stockRangeUpper : double
 318 m_volatility : double
 319 m_volatilityType : int
 320 m_continuousUpdate : int
 321 m_referencePriceType : int
 322 m_deltaNeutralOrderType : String
 323 m_deltaNeutralAuxPrice : double
 324 m_basisPoints : double
 325 m_basisPointsType : int
 326 m_scaleNumComponents : int
 327 m_scaleComponentSize : int
 328 m_scalePriceIncrement : double
 329 m_account : String
 330 m_settlingFirm : String
 331 m_clearingAccount : String
 332 m_clearingIntent : String
 333 m_whatIf : boolean
 334 Order()
 335 equals(Object)
 336 }}}
 337 
 338 == Scanner Subscription == 
 339 
 340 {{{#!java
 341 NO_ROW_NUMBER_SPECIFIED : int
 342 m_numberOfRows : int
 343 m_instrument : String
 344 m_locationCode : String
 345 m_scanCode : String
 346 m_abovePrice : double
 347 m_belowPrice : double
 348 m_aboveVolume : int
 349 m_averageOptionVolumeAbove : int
 350 m_marketCapAbove : double
 351 m_marketCapBelow : double
 352 m_moodyRatingAbove : String
 353 m_moodyRatingBelow : String
 354 m_spRatingAbove : String
 355 m_spRatingBelow : String
 356 m_maturityDateAbove : String
 357 m_maturityDateBelow : String
 358 m_couponRateAbove : double
 359 m_couponRateBelow : double
 360 m_excludeConvertible : String
 361 m_scannerSettingPairs : String
 362 m_stockTypeFilter : String
 363 numberOfRows()
 364 instrument()
 365 locationCode()
 366 scanCode()
 367 abovePrice()
 368 belowPrice()
 369 aboveVolume()
 370 averageOptionVolumeAbove()
 371 marketCapAbove()
 372 marketCapBelow()
 373 moodyRatingAbove()
 374 moodyRatingBelow()
 375 spRatingAbove()
 376 spRatingBelow()
 377 maturityDateAbove()
 378 maturityDateBelow()
 379 couponRateAbove()
 380 couponRateBelow()
 381 excludeConvertible()
 382 scannerSettingPairs()
 383 stockTypeFilter()
 384 numberOfRows(int)
 385 instrument(String)
 386 locationCode(String)
 387 scanCode(String)
 388 abovePrice(double)
 389 belowPrice(double)
 390 aboveVolume(int)
 391 averageOptionVolumeAbove(int)
 392 marketCapAbove(double)
 393 marketCapBelow(double)
 394 moodyRatingAbove(String)
 395 moodyRatingBelow(String)
 396 spRatingAbove(String)
 397 spRatingBelow(String)
 398 maturityDateAbove(String)
 399 maturityDateBelow(String)
 400 couponRateAbove(double)
 401 couponRateBelow(double)
 402 excludeConvertible(String)
 403 scannerSettingPairs(String)
 404 stockTypeFilter(String)
 405 }}}
 406 
 407 == Tick Type ==
 408 
 409 {{{#!java
 410 BID_SIZE : int
 411 BID : int
 412 ASK : int
 413 ASK_SIZE : int
 414 LAST : int
 415 LAST_SIZE : int
 416 HIGH : int
 417 LOW : int
 418 VOLUME : int
 419 CLOSE : int
 420 BID_OPTION : int
 421 ASK_OPTION : int
 422 LAST_OPTION : int
 423 MODEL_OPTION : int
 424 OPEN : int
 425 LOW_13_WEEK : int
 426 HIGH_13_WEEK : int
 427 LOW_26_WEEK : int
 428 HIGH_26_WEEK : int
 429 LOW_52_WEEK : int
 430 HIGH_52_WEEK : int
 431 AVG_VOLUME : int
 432 OPEN_INTEREST : int
 433 OPTION_HISTORICAL_VOL : int
 434 OPTION_IMPLIED_VOL : int
 435 OPTION_BID_EXCH : int
 436 OPTION_ASK_EXCH : int
 437 OPTION_CALL_OPEN_INTEREST : int
 438 OPTION_PUT_OPEN_INTEREST : int
 439 OPTION_CALL_VOLUME : int
 440 OPTION_PUT_VOLUME : int
 441 INDEX_FUTURE_PREMIUM : int
 442 BID_EXCH : int
 443 ASK_EXCH : int
 444 AUCTION_VOLUME : int
 445 AUCTION_PRICE : int
 446 AUCTION_IMBALANCE : int
 447 MARK_PRICE : int
 448 BID_EFP_COMPUTATION : int
 449 ASK_EFP_COMPUTATION : int
 450 LAST_EFP_COMPUTATION : int
 451 OPEN_EFP_COMPUTATION : int
 452 HIGH_EFP_COMPUTATION : int
 453 LOW_EFP_COMPUTATION : int
 454 CLOSE_EFP_COMPUTATION : int
 455 LAST_TIMESTAMP : int
 456 SHORTABLE : int
 457 getField(int)
 458 }}}
 459 
 460 == Execution ==
 461 
 462 {{{#!java
 463 m_orderId : int
 464 m_clientId : int
 465 m_execId : String
 466 m_time : String
 467 m_acctNumber : String
 468 m_exchange : String
 469 m_side : String
 470 m_shares : int
 471 m_price : double
 472 m_permId : int
 473 m_liquidation : int
 474 Execution()
 475 Execution(int, int, String, String, String, String, String, int, double, int, int)
 476 equals(Object)
 477 }}}
 478 
 479 == Execution Filter ==
 480 
 481 {{{#!java
 482 m_clientId : int
 483 m_acctCode : String
 484 m_time : String
 485 m_symbol : String
 486 m_secType : String
 487 m_exchange : String
 488 m_side : String
 489 ExecutionFilter()
 490 ExecutionFilter(int, String, String, String, String, String, String)
 491 equals(Object)
 492 }}}
 493 
 494 
 495 ----
 496 CategoryFinance

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.