ibapi-latest 10.40.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. ibapi_latest-10.40.1/LICENSE +125 -0
  2. ibapi_latest-10.40.1/PKG-INFO +196 -0
  3. ibapi_latest-10.40.1/README.md +168 -0
  4. ibapi_latest-10.40.1/ibapi/ibapi/__init__.py +16 -0
  5. ibapi_latest-10.40.1/ibapi/ibapi/account_summary_tags.py +70 -0
  6. ibapi_latest-10.40.1/ibapi/ibapi/client.py +7386 -0
  7. ibapi_latest-10.40.1/ibapi/ibapi/client_utils.py +1112 -0
  8. ibapi_latest-10.40.1/ibapi/ibapi/comm.py +100 -0
  9. ibapi_latest-10.40.1/ibapi/ibapi/commission_and_fees_report.py +31 -0
  10. ibapi_latest-10.40.1/ibapi/ibapi/common.py +400 -0
  11. ibapi_latest-10.40.1/ibapi/ibapi/connection.py +126 -0
  12. ibapi_latest-10.40.1/ibapi/ibapi/const.py +12 -0
  13. ibapi_latest-10.40.1/ibapi/ibapi/contract.py +271 -0
  14. ibapi_latest-10.40.1/ibapi/ibapi/decoder.py +2955 -0
  15. ibapi_latest-10.40.1/ibapi/ibapi/decoder_utils.py +668 -0
  16. ibapi_latest-10.40.1/ibapi/ibapi/enum_implem.py +20 -0
  17. ibapi_latest-10.40.1/ibapi/ibapi/errors.py +117 -0
  18. ibapi_latest-10.40.1/ibapi/ibapi/execution.py +95 -0
  19. ibapi_latest-10.40.1/ibapi/ibapi/ineligibility_reason.py +18 -0
  20. ibapi_latest-10.40.1/ibapi/ibapi/message.py +188 -0
  21. ibapi_latest-10.40.1/ibapi/ibapi/news.py +13 -0
  22. ibapi_latest-10.40.1/ibapi/ibapi/object_implem.py +12 -0
  23. ibapi_latest-10.40.1/ibapi/ibapi/order.py +263 -0
  24. ibapi_latest-10.40.1/ibapi/ibapi/order_cancel.py +21 -0
  25. ibapi_latest-10.40.1/ibapi/ibapi/order_condition.py +289 -0
  26. ibapi_latest-10.40.1/ibapi/ibapi/order_state.py +117 -0
  27. ibapi_latest-10.40.1/ibapi/ibapi/orderdecoder.py +539 -0
  28. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountDataEnd_pb2.py +37 -0
  29. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountDataRequest_pb2.py +37 -0
  30. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountSummaryEnd_pb2.py +37 -0
  31. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountSummaryRequest_pb2.py +37 -0
  32. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountSummary_pb2.py +37 -0
  33. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountUpdateMultiEnd_pb2.py +37 -0
  34. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountUpdateMulti_pb2.py +37 -0
  35. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountUpdateTime_pb2.py +37 -0
  36. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountUpdatesMultiRequest_pb2.py +37 -0
  37. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AccountValue_pb2.py +37 -0
  38. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AllOpenOrdersRequest_pb2.py +37 -0
  39. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/AutoOpenOrdersRequest_pb2.py +37 -0
  40. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CalculateImpliedVolatilityRequest_pb2.py +42 -0
  41. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CalculateOptionPriceRequest_pb2.py +42 -0
  42. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelAccountSummary_pb2.py +37 -0
  43. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelAccountUpdatesMulti_pb2.py +37 -0
  44. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelCalculateImpliedVolatility_pb2.py +37 -0
  45. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelCalculateOptionPrice_pb2.py +37 -0
  46. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelContractData_pb2.py +37 -0
  47. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelFundamentalsData_pb2.py +37 -0
  48. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelHeadTimestamp_pb2.py +37 -0
  49. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelHistogramData_pb2.py +37 -0
  50. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelHistoricalData_pb2.py +37 -0
  51. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelHistoricalTicks_pb2.py +37 -0
  52. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelMarketData_pb2.py +37 -0
  53. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelMarketDepth_pb2.py +37 -0
  54. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelNewsBulletins_pb2.py +37 -0
  55. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelOrderRequest_pb2.py +38 -0
  56. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelPnLSingle_pb2.py +37 -0
  57. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelPnL_pb2.py +37 -0
  58. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelPositionsMulti_pb2.py +37 -0
  59. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelPositions_pb2.py +37 -0
  60. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelRealTimeBars_pb2.py +37 -0
  61. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelScannerSubscription_pb2.py +37 -0
  62. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelTickByTick_pb2.py +37 -0
  63. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelWshEventData_pb2.py +37 -0
  64. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CancelWshMetaData_pb2.py +37 -0
  65. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ComboLeg_pb2.py +37 -0
  66. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CommissionAndFeesReport_pb2.py +37 -0
  67. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CompletedOrder_pb2.py +40 -0
  68. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CompletedOrdersEnd_pb2.py +37 -0
  69. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CompletedOrdersRequest_pb2.py +37 -0
  70. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ContractDataEnd_pb2.py +37 -0
  71. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ContractDataRequest_pb2.py +38 -0
  72. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ContractData_pb2.py +39 -0
  73. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ContractDescription_pb2.py +38 -0
  74. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ContractDetails_pb2.py +42 -0
  75. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/Contract_pb2.py +39 -0
  76. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CurrentTimeInMillisRequest_pb2.py +37 -0
  77. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CurrentTimeInMillis_pb2.py +37 -0
  78. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CurrentTimeRequest_pb2.py +37 -0
  79. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/CurrentTime_pb2.py +37 -0
  80. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/DeltaNeutralContract_pb2.py +37 -0
  81. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/DepthMarketDataDescription_pb2.py +37 -0
  82. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/DisplayGroupList_pb2.py +37 -0
  83. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/DisplayGroupUpdated_pb2.py +37 -0
  84. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ErrorMessage_pb2.py +37 -0
  85. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ExecutionDetailsEnd_pb2.py +37 -0
  86. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ExecutionDetails_pb2.py +39 -0
  87. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ExecutionFilter_pb2.py +37 -0
  88. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ExecutionRequest_pb2.py +38 -0
  89. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/Execution_pb2.py +37 -0
  90. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ExerciseOptionsRequest_pb2.py +38 -0
  91. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FAReplace_pb2.py +37 -0
  92. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FARequest_pb2.py +37 -0
  93. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FamilyCode_pb2.py +37 -0
  94. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FamilyCodesRequest_pb2.py +37 -0
  95. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FamilyCodes_pb2.py +38 -0
  96. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FundamentalsDataRequest_pb2.py +42 -0
  97. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/FundamentalsData_pb2.py +37 -0
  98. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/GlobalCancelRequest_pb2.py +38 -0
  99. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HeadTimestampRequest_pb2.py +38 -0
  100. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HeadTimestamp_pb2.py +37 -0
  101. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistogramDataEntry_pb2.py +37 -0
  102. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistogramDataRequest_pb2.py +38 -0
  103. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistogramData_pb2.py +38 -0
  104. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalDataBar_pb2.py +37 -0
  105. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalDataEnd_pb2.py +37 -0
  106. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalDataRequest_pb2.py +42 -0
  107. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalDataUpdate_pb2.py +38 -0
  108. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalData_pb2.py +38 -0
  109. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalNewsEnd_pb2.py +37 -0
  110. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalNewsRequest_pb2.py +41 -0
  111. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalNews_pb2.py +37 -0
  112. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalSchedule_pb2.py +38 -0
  113. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalSession_pb2.py +37 -0
  114. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTickBidAsk_pb2.py +38 -0
  115. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTickLast_pb2.py +38 -0
  116. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTick_pb2.py +37 -0
  117. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTicksBidAsk_pb2.py +38 -0
  118. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTicksLast_pb2.py +38 -0
  119. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTicksRequest_pb2.py +42 -0
  120. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/HistoricalTicks_pb2.py +38 -0
  121. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/IdsRequest_pb2.py +37 -0
  122. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/IneligibilityReason_pb2.py +37 -0
  123. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ManagedAccountsRequest_pb2.py +37 -0
  124. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ManagedAccounts_pb2.py +37 -0
  125. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDataRequest_pb2.py +42 -0
  126. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDataTypeRequest_pb2.py +37 -0
  127. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDataType_pb2.py +37 -0
  128. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepthData_pb2.py +37 -0
  129. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepthExchangesRequest_pb2.py +37 -0
  130. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepthExchanges_pb2.py +38 -0
  131. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepthL2_pb2.py +38 -0
  132. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepthRequest_pb2.py +42 -0
  133. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketDepth_pb2.py +38 -0
  134. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketRuleRequest_pb2.py +37 -0
  135. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MarketRule_pb2.py +38 -0
  136. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/MatchingSymbolsRequest_pb2.py +37 -0
  137. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsArticleRequest_pb2.py +41 -0
  138. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsArticle_pb2.py +37 -0
  139. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsBulletin_pb2.py +37 -0
  140. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsBulletinsRequest_pb2.py +37 -0
  141. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsProvider_pb2.py +37 -0
  142. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsProvidersRequest_pb2.py +37 -0
  143. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NewsProviders_pb2.py +38 -0
  144. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/NextValidId_pb2.py +37 -0
  145. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OpenOrder_pb2.py +40 -0
  146. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OpenOrdersEnd_pb2.py +37 -0
  147. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OpenOrdersRequest_pb2.py +37 -0
  148. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderAllocation_pb2.py +37 -0
  149. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderBound_pb2.py +37 -0
  150. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderCancel_pb2.py +37 -0
  151. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderCondition_pb2.py +37 -0
  152. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderState_pb2.py +38 -0
  153. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/OrderStatus_pb2.py +37 -0
  154. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/Order_pb2.py +51 -0
  155. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PlaceOrderRequest_pb2.py +39 -0
  156. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PnLRequest_pb2.py +37 -0
  157. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PnLSingleRequest_pb2.py +37 -0
  158. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PnLSingle_pb2.py +37 -0
  159. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PnL_pb2.py +37 -0
  160. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PortfolioValue_pb2.py +38 -0
  161. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PositionEnd_pb2.py +37 -0
  162. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PositionMultiEnd_pb2.py +37 -0
  163. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PositionMulti_pb2.py +38 -0
  164. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/Position_pb2.py +38 -0
  165. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PositionsMultiRequest_pb2.py +37 -0
  166. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PositionsRequest_pb2.py +37 -0
  167. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/PriceIncrement_pb2.py +37 -0
  168. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/QueryDisplayGroupsRequest_pb2.py +37 -0
  169. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/RealTimeBarTick_pb2.py +37 -0
  170. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/RealTimeBarsRequest_pb2.py +42 -0
  171. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ReceiveFA_pb2.py +37 -0
  172. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ReplaceFAEnd_pb2.py +37 -0
  173. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/RerouteMarketDataRequest_pb2.py +37 -0
  174. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/RerouteMarketDepthRequest_pb2.py +37 -0
  175. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerDataElement_pb2.py +38 -0
  176. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerData_pb2.py +38 -0
  177. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerParametersRequest_pb2.py +37 -0
  178. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerParameters_pb2.py +37 -0
  179. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerSubscriptionRequest_pb2.py +38 -0
  180. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/ScannerSubscription_pb2.py +45 -0
  181. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SecDefOptParameterEnd_pb2.py +37 -0
  182. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SecDefOptParameter_pb2.py +37 -0
  183. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SecDefOptParamsRequest_pb2.py +37 -0
  184. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SetServerLogLevelRequest_pb2.py +37 -0
  185. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SmartComponent_pb2.py +37 -0
  186. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SmartComponentsRequest_pb2.py +37 -0
  187. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SmartComponents_pb2.py +38 -0
  188. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SoftDollarTier_pb2.py +37 -0
  189. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SoftDollarTiersRequest_pb2.py +37 -0
  190. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SoftDollarTiers_pb2.py +38 -0
  191. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/StartApiRequest_pb2.py +37 -0
  192. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SubscribeToGroupEventsRequest_pb2.py +37 -0
  193. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/SymbolSamples_pb2.py +38 -0
  194. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickAttribBidAsk_pb2.py +37 -0
  195. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickAttribLast_pb2.py +37 -0
  196. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickByTickData_pb2.py +40 -0
  197. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickByTickRequest_pb2.py +38 -0
  198. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickGeneric_pb2.py +37 -0
  199. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickNews_pb2.py +37 -0
  200. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickOptionComputation_pb2.py +37 -0
  201. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickPrice_pb2.py +37 -0
  202. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickReqParams_pb2.py +37 -0
  203. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickSize_pb2.py +37 -0
  204. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickSnapshotEnd_pb2.py +37 -0
  205. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/TickString_pb2.py +37 -0
  206. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/UnsubscribeFromGroupEventsRequest_pb2.py +37 -0
  207. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/UpdateDisplayGroupRequest_pb2.py +37 -0
  208. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/UserInfoRequest_pb2.py +37 -0
  209. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/UserInfo_pb2.py +37 -0
  210. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/VerifyCompleted_pb2.py +37 -0
  211. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/VerifyMessageApi_pb2.py +37 -0
  212. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/VerifyMessageRequest_pb2.py +37 -0
  213. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/VerifyRequest_pb2.py +37 -0
  214. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/WshEventDataRequest_pb2.py +37 -0
  215. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/WshEventData_pb2.py +37 -0
  216. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/WshMetaDataRequest_pb2.py +37 -0
  217. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/WshMetaData_pb2.py +37 -0
  218. ibapi_latest-10.40.1/ibapi/ibapi/protobuf/__init__.py +1 -0
  219. ibapi_latest-10.40.1/ibapi/ibapi/reader.py +49 -0
  220. ibapi_latest-10.40.1/ibapi/ibapi/scanner.py +80 -0
  221. ibapi_latest-10.40.1/ibapi/ibapi/server_versions.py +171 -0
  222. ibapi_latest-10.40.1/ibapi/ibapi/softdollartier.py +16 -0
  223. ibapi_latest-10.40.1/ibapi/ibapi/sync_wrapper.py +656 -0
  224. ibapi_latest-10.40.1/ibapi/ibapi/tag_value.py +22 -0
  225. ibapi_latest-10.40.1/ibapi/ibapi/ticktype.py +117 -0
  226. ibapi_latest-10.40.1/ibapi/ibapi/utils.py +233 -0
  227. ibapi_latest-10.40.1/ibapi/ibapi/wrapper.py +1179 -0
  228. ibapi_latest-10.40.1/ibapi/ibapi_latest.egg-info/PKG-INFO +196 -0
  229. ibapi_latest-10.40.1/ibapi/ibapi_latest.egg-info/SOURCES.txt +232 -0
  230. ibapi_latest-10.40.1/ibapi/ibapi_latest.egg-info/dependency_links.txt +1 -0
  231. ibapi_latest-10.40.1/ibapi/ibapi_latest.egg-info/requires.txt +1 -0
  232. ibapi_latest-10.40.1/ibapi/ibapi_latest.egg-info/top_level.txt +1 -0
  233. ibapi_latest-10.40.1/pyproject.toml +46 -0
  234. ibapi_latest-10.40.1/setup.cfg +4 -0
@@ -0,0 +1,125 @@
1
+ # LICENSE
2
+
3
+ ## Interactive Brokers TWS API
4
+
5
+ The Interactive Brokers TWS API source code (`ibapi/` directory) is licensed under the **TWS API Non-Commercial License** as provided by Interactive Brokers LLC.
6
+
7
+ ---
8
+
9
+ ## TWS API Non-Commercial License
10
+
11
+ This TWS API Non-Commercial License ("License") is an agreement between Interactive Brokers LLC ("IB") and You, and governs Your use of the API Code. By using this software, you acknowledge that You consent to be legally bound by this Agreement.
12
+
13
+ ### 0. Introduction
14
+
15
+ IB has developed application program interface ("API") code to permit its customers to use their own internal proprietary software tools in managing their accounts with IB. This License is intended only for users who wish to use the API Code by itself as is, or in connection with or for the development of their own internal proprietary tools to manage their own IB accounts.
16
+
17
+ **This License is NOT for anybody who is developing software applications that they wish to:**
18
+ - (a) sell to third party users for a fee, or
19
+ - (b) give to third party users to generate an indirect financial benefit (e.g., commissions)
20
+
21
+ If You wish to make a software application for the purposes described in the preceding sentence then please contact Shail Mangla at opensource@interactivebrokers.com.
22
+
23
+ ### 1. Definitions
24
+
25
+ **1.1. "API Code"** means the client code for IB's Trader Workstation API that is made available to You.
26
+
27
+ **1.2. "Non-Commercial Purposes"** means using API Code by itself as is, or in connection with or for the development of applications, programs, or other works that:
28
+ - (a) interface with IB's trading platform, and
29
+ - (b) allow You to access Your account information, access market data, perform analytics, enter orders, or perform any other transactions or functions all in connection with Your account at IB.
30
+
31
+ **1.3. "You" or "Your"** means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You.
32
+
33
+ ### 2. License Grant
34
+
35
+ Subject to the terms of this License, IB hereby grants You, effective on the date You accept this License and download the API Code, a personal, royalty-free, non-exclusive, non-sublicensable, non-transferable, restricted right and license to install, modify and use the API Code solely for Non-Commercial Purposes.
36
+
37
+ ### 3. Restrictions
38
+
39
+ **3.1.** You acknowledge and agree that You shall only use the API Code for Non-Commercial Purposes. Any other uses of the API Code are expressly prohibited.
40
+
41
+ **3.2.** You must retain and reproduce in all copies of API Code the copyright and other proprietary notices and disclaimers of IB as they appear in the API Code, and keep intact all notices in the API Code that refer to this License.
42
+
43
+ **3.3.** You agree not to publish, disseminate, or redistribute the API Code to any third party.
44
+
45
+ **3.4.** You agree that You will maintain an account at IB for the duration of this License.
46
+
47
+ **3.5.** You agree not to use the API for any purpose that violates any law or regulation, any right of any person, including but not limited to intellectual property rights, rights of privacy, or rights of personality, or in any manner inconsistent with IB's terms of use, privacy policy or this License.
48
+
49
+ ### 4. Ownership of API Code
50
+
51
+ Except as expressly set forth herein, IB or its licensors shall own all right, title and interest in and to the API Code.
52
+
53
+ ### 5. DISCLAIMER OF WARRANTIES
54
+
55
+ **5.1.** You expressly acknowledge and agree that although IB grants the license to the API Code set forth herein, IB and its licensors provide no assurances that the API Code does not infringe the patent or other intellectual property rights of any other entity. IB and its licensors disclaim any liability to You for claims brought by any other person or entity based on infringement of intellectual property rights or otherwise.
56
+
57
+ **5.2.** The API Code may contain in whole or in part pre-release, untested, or not fully tested works. The API Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the API Code, or any portion thereof, is at Your sole and entire risk.
58
+
59
+ **YOU UNDERSTAND AND AGREE THAT THE API CODE IS PROVIDED "AS IS" AND ON AN "AS-AVAILABLE" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE API CODE IS FREE OF DEFECTS, MERCHANTABLE, NON-INFRINGING OR FIT FOR A PARTICULAR PURPOSE. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY API CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.**
60
+
61
+ ### 6. LIMITATION OF LIABILITY
62
+
63
+ **YOU UNDERSTAND AND AGREE THAT IB, ITS AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE API CODE OR THE USE OF THE API CODE, INCLUDING ANY TRADING LOSS, LOSS OF PROFIT, LOSS OF BUSINESS, OR LOSS OF DATA, WHETHER OR NOT IB OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.**
64
+
65
+ ### 7. Indemnification
66
+
67
+ To the maximum extent permitted by law, You agree to defend, indemnify and hold harmless IB, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from:
68
+ - (a) Your use of the API Code,
69
+ - (b) any application You develop with the API Code that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person, and
70
+ - (c) any non-compliance by You with this License.
71
+
72
+ ### 8. Termination
73
+
74
+ **8.1.** This License and the rights granted hereunder will terminate automatically:
75
+ - (a) if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach;
76
+ - (b) if You are no longer a customer of IB; or
77
+ - (c) if You, at any time during the term of this License, commence an action for patent infringement against IB (provided that IB did not first commence an action for patent infringement against You in that instance).
78
+
79
+ **8.2.** You shall destroy all copies of the API Code upon termination of this License, and shall not retain the API Code in any form after such destruction.
80
+
81
+ **8.3.** The following sections shall survive any termination: 3, 4, 5, 6, 7, 8, and 9.
82
+
83
+ ### 9. General
84
+
85
+ **9.1.** You agree that if IB does not exercise or enforce any legal right or remedy which is contained in this License or is available to IB under any applicable law, this will not be taken to be a formal waiver of IB's rights and that those rights or remedies will still be available to IB.
86
+
87
+ **9.2.** If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License is invalid, then that provision will be removed from this License without affecting the rest of this License. The remaining provisions of this License will continue to be valid and enforceable.
88
+
89
+ **9.3.** This License constitutes the whole legal agreement between You and IB and governs Your use of the API Code, and completely replaces any prior agreements between You and IB in relation to the API Code.
90
+
91
+ **9.4.** If You are entering into this Agreement on behalf of your employer or other entity, You represent and warrant that You have full legal authority to bind your employer or such entity to this Agreement.
92
+
93
+ **9.5.** You may not assign the rights granted in this License without IB's prior written approval.
94
+
95
+ **9.6.** This License shall be governed by the laws of the State of Connecticut without regard to its conflicts of laws provisions. You agree to submit to the exclusive jurisdiction of the courts located within the county of Fairfield, Connecticut to resolve any legal matter arising from this License. Notwithstanding this, You agree that IB shall be allowed to apply for injunctive remedies in any jurisdiction.
96
+
97
+ ---
98
+
99
+ ## Automation Scripts
100
+
101
+ The automation scripts in the `scripts/` directory and GitHub Actions workflows in `.github/workflows/` are provided under the MIT License:
102
+
103
+ ```
104
+ MIT License
105
+
106
+ Copyright (c) 2024 ibapi contributors
107
+
108
+ Permission is hereby granted, free of charge, to any person obtaining a copy
109
+ of this software and associated documentation files (the "Software"), to deal
110
+ in the Software without restriction, including without limitation the rights
111
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
112
+ copies of the Software, and to permit persons to whom the Software is
113
+ furnished to do so, subject to the following conditions:
114
+
115
+ The above copyright notice and this permission notice shall be included in all
116
+ copies or substantial portions of the Software.
117
+
118
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
119
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
120
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
121
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
122
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
123
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
124
+ SOFTWARE.
125
+ ```
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.4
2
+ Name: ibapi-latest
3
+ Version: 10.40.1
4
+ Summary: Interactive Brokers Python API
5
+ Author-email: Interactive Brokers LLC <api@interactivebrokers.com>
6
+ Maintainer: IB API Automated Publisher
7
+ Project-URL: Homepage, https://interactivebrokers.github.io/tws-api
8
+ Project-URL: Documentation, https://ibkrcampus.com/ibkr-api-page/
9
+ Project-URL: Repository, https://github.com/yourusername/ibapi
10
+ Project-URL: Bug Tracker, https://github.com/yourusername/ibapi/issues
11
+ Keywords: interactive brokers,ibapi,tws,trading,api
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Financial and Insurance Industry
15
+ Classifier: Topic :: Office/Business :: Financial :: Investment
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Requires-Python: >=3.1
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: protobuf==5.29.3
27
+ Dynamic: license-file
28
+
29
+ # ibapi
30
+
31
+ > **⚠️ UNOFFICIAL PACKAGE** | This is an independent community project, **NOT** officially affiliated with Interactive Brokers LLC.
32
+
33
+ Automated publisher for the Interactive Brokers TWS API Python client on PyPI.
34
+
35
+ [![PyPI Latest](https://img.shields.io/pypi/v/ibapi-latest?label=latest)](https://pypi.org/project/ibapi-latest/)
36
+ [![PyPI Stable](https://img.shields.io/pypi/v/ibapi-stable?label=stable)](https://pypi.org/project/ibapi-stable/)
37
+ [![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
38
+ [![License](https://img.shields.io/badge/license-IB%20API%20Non--Commercial-blue.svg)](LICENSE)
39
+
40
+ ## 📦 Installation
41
+
42
+ **Two packages available on PyPI:**
43
+
44
+ ### Latest Version (Recommended)
45
+ ```bash
46
+ pip install ibapi-latest
47
+ ```
48
+
49
+ ### Stable Version
50
+ ```bash
51
+ pip install ibapi-stable
52
+ ```
53
+
54
+ You can also install a specific version:
55
+ ```bash
56
+ pip install ibapi-latest==10.40.01
57
+ pip install ibapi-stable==10.37.02
58
+ ```
59
+
60
+ ## 🚀 Usage
61
+
62
+ ```python
63
+ from ibapi.client import EClient
64
+ from ibapi.wrapper import EWrapper
65
+ from ibapi.contract import Contract
66
+
67
+ class IBApp(EWrapper, EClient):
68
+ def __init__(self):
69
+ EClient.__init__(self, self)
70
+
71
+ app = IBApp()
72
+ app.connect("127.0.0.1", 7497, clientId=1)
73
+ app.run()
74
+ ```
75
+
76
+ For complete examples and documentation, visit the [official IB API documentation](https://ibkrcampus.com/ibkr-api-page/).
77
+
78
+ ## 📋 About This Package
79
+
80
+ This is an **unofficial** automated publisher for the Interactive Brokers TWS API Python client. The source code is from Interactive Brokers' official TWS API distribution, packaged and published to PyPI for easy installation.
81
+
82
+ > **⚠️ DISCLAIMER**
83
+ >
84
+ > This package is **NOT officially affiliated with, endorsed by, or supported by Interactive Brokers LLC**. It is an independent community project that automates the packaging and distribution of the official IB API source code.
85
+ >
86
+ > - The IB API source code is proprietary to Interactive Brokers and is licensed under the [TWS API Non-Commercial License](LICENSE)
87
+ > - This automation tool is provided "as is" without any warranties
88
+ > - For official support, please contact [Interactive Brokers](https://www.interactivebrokers.com/en/support/contact.php)
89
+ > - Trading involves risk. Use at your own discretion.
90
+
91
+ ### Two PyPI Packages
92
+
93
+ - **`ibapi-latest`**: The newest IB API version (from `main` branch)
94
+ - **`ibapi-stable`**: Previous IB API versions (from `stable` branch)
95
+
96
+ Both packages are automatically updated weekly when new IB API versions are released.
97
+
98
+ ## 🏗️ Project Structure
99
+
100
+ ```
101
+ ibapi/
102
+ ├── .github/
103
+ │ └── workflows/ # GitHub Actions for automation
104
+ │ ├── update-ibapi-latest.yml # Latest version publisher
105
+ │ └── update-ibapi-stable.yml # Stable version publisher
106
+ ├── scripts/ # Automation scripts
107
+ │ ├── get_download_url.py # Fetch IB API download URLs
108
+ │ ├── update_ibapi.py # Download and commit IB API
109
+ │ └── check_and_update.py # Orchestrator (legacy)
110
+ ├── ibapi/ # IB API Python client (auto-updated)
111
+ │ └── ibapi/
112
+ │ ├── client.py
113
+ │ ├── wrapper.py
114
+ │ └── ...
115
+ ├── pyproject.toml # Package configuration
116
+ └── README.md
117
+ ```
118
+
119
+ ## 🔄 How It Works
120
+
121
+ ### Automated Workflow
122
+
123
+ 1. **Weekly Check**: GitHub Actions runs every Monday at 9:00 AM UTC
124
+ 2. **Version Detection**: Scrapes https://interactivebrokers.github.io/ for new versions
125
+ 3. **Download & Extract**: Downloads the TWS API zip and extracts the Python client
126
+ 4. **Auto-Fix**: Automatically fixes version strings and package configuration
127
+ 5. **Build & Publish**: Builds the package and publishes to PyPI
128
+ 6. **Tag & Release**: Creates git tags and GitHub releases
129
+
130
+ ### Version Management
131
+
132
+ - Versions follow IB's format: `10.40.01`, `10.37.02`, etc.
133
+ - Git tags: `v10.40.01`, `v10.37.02`, etc.
134
+ - PyPI packages:
135
+ - Latest: `ibapi-latest==10.40.01`
136
+ - Stable: `ibapi-stable==10.37.02`
137
+
138
+ ## 📝 License
139
+
140
+ This project has a **dual license structure**:
141
+
142
+ ### IB API Source Code (`ibapi/` directory)
143
+
144
+ The Interactive Brokers TWS API source code is proprietary software owned by Interactive Brokers LLC and is licensed under the **[TWS API Non-Commercial License](LICENSE)**.
145
+
146
+ **Key restrictions:**
147
+ - ✅ Use for personal trading and account management
148
+ - ✅ Develop internal proprietary tools for your own IB account
149
+ - ❌ **NOT permitted**: Selling software to third parties
150
+ - ❌ **NOT permitted**: Distributing software to generate indirect financial benefit (e.g., commissions)
151
+ - ⚠️ **Requires**: Active Interactive Brokers account
152
+
153
+ **For commercial use**, contact Interactive Brokers at: opensource@interactivebrokers.com
154
+
155
+ **Full license text**: See [LICENSE](LICENSE) file
156
+
157
+ ### Automation Scripts (`scripts/` directory, workflows)
158
+
159
+ The automation tooling that packages and publishes the IB API is licensed under the **MIT License**.
160
+
161
+ See the [LICENSE](LICENSE) file for complete details.
162
+
163
+ ## 🔗 Links
164
+
165
+ - **PyPI Packages**:
166
+ - Latest: https://pypi.org/project/ibapi-latest/
167
+ - Stable: https://pypi.org/project/ibapi-stable/
168
+ - **Official IB API**: https://interactivebrokers.github.io/tws-api
169
+ - **Documentation**: https://ibkrcampus.com/ibkr-api-page/
170
+ - **GitHub Repository**: https://github.com/yourusername/ibapi
171
+
172
+ ## 🐛 Support
173
+
174
+ For issues with:
175
+ - **The IB API itself**: Contact [Interactive Brokers](https://www.interactivebrokers.com/en/support/contact.php)
176
+ - **This package/automation**: Open an [issue on GitHub](https://github.com/yourusername/ibapi/issues)
177
+
178
+ ## ⚙️ Configuration
179
+
180
+ The package configuration is in `pyproject.toml`:
181
+
182
+ ```toml
183
+ [project]
184
+ name = "ibapi"
185
+ dynamic = ["version"] # Version from ibapi.__version__
186
+ dependencies = ["protobuf==5.29.3"]
187
+
188
+ [tool.setuptools]
189
+ packages = ["ibapi", "ibapi.protobuf"]
190
+ package-dir = {"" = "ibapi"} # Maps ibapi/ibapi/* to ibapi/*
191
+ ```
192
+
193
+ This ensures imports work as expected:
194
+ ```python
195
+ from ibapi.client import EClient # Not from ibapi.ibapi.client
196
+ ```
@@ -0,0 +1,168 @@
1
+ # ibapi
2
+
3
+ > **⚠️ UNOFFICIAL PACKAGE** | This is an independent community project, **NOT** officially affiliated with Interactive Brokers LLC.
4
+
5
+ Automated publisher for the Interactive Brokers TWS API Python client on PyPI.
6
+
7
+ [![PyPI Latest](https://img.shields.io/pypi/v/ibapi-latest?label=latest)](https://pypi.org/project/ibapi-latest/)
8
+ [![PyPI Stable](https://img.shields.io/pypi/v/ibapi-stable?label=stable)](https://pypi.org/project/ibapi-stable/)
9
+ [![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
10
+ [![License](https://img.shields.io/badge/license-IB%20API%20Non--Commercial-blue.svg)](LICENSE)
11
+
12
+ ## 📦 Installation
13
+
14
+ **Two packages available on PyPI:**
15
+
16
+ ### Latest Version (Recommended)
17
+ ```bash
18
+ pip install ibapi-latest
19
+ ```
20
+
21
+ ### Stable Version
22
+ ```bash
23
+ pip install ibapi-stable
24
+ ```
25
+
26
+ You can also install a specific version:
27
+ ```bash
28
+ pip install ibapi-latest==10.40.01
29
+ pip install ibapi-stable==10.37.02
30
+ ```
31
+
32
+ ## 🚀 Usage
33
+
34
+ ```python
35
+ from ibapi.client import EClient
36
+ from ibapi.wrapper import EWrapper
37
+ from ibapi.contract import Contract
38
+
39
+ class IBApp(EWrapper, EClient):
40
+ def __init__(self):
41
+ EClient.__init__(self, self)
42
+
43
+ app = IBApp()
44
+ app.connect("127.0.0.1", 7497, clientId=1)
45
+ app.run()
46
+ ```
47
+
48
+ For complete examples and documentation, visit the [official IB API documentation](https://ibkrcampus.com/ibkr-api-page/).
49
+
50
+ ## 📋 About This Package
51
+
52
+ This is an **unofficial** automated publisher for the Interactive Brokers TWS API Python client. The source code is from Interactive Brokers' official TWS API distribution, packaged and published to PyPI for easy installation.
53
+
54
+ > **⚠️ DISCLAIMER**
55
+ >
56
+ > This package is **NOT officially affiliated with, endorsed by, or supported by Interactive Brokers LLC**. It is an independent community project that automates the packaging and distribution of the official IB API source code.
57
+ >
58
+ > - The IB API source code is proprietary to Interactive Brokers and is licensed under the [TWS API Non-Commercial License](LICENSE)
59
+ > - This automation tool is provided "as is" without any warranties
60
+ > - For official support, please contact [Interactive Brokers](https://www.interactivebrokers.com/en/support/contact.php)
61
+ > - Trading involves risk. Use at your own discretion.
62
+
63
+ ### Two PyPI Packages
64
+
65
+ - **`ibapi-latest`**: The newest IB API version (from `main` branch)
66
+ - **`ibapi-stable`**: Previous IB API versions (from `stable` branch)
67
+
68
+ Both packages are automatically updated weekly when new IB API versions are released.
69
+
70
+ ## 🏗️ Project Structure
71
+
72
+ ```
73
+ ibapi/
74
+ ├── .github/
75
+ │ └── workflows/ # GitHub Actions for automation
76
+ │ ├── update-ibapi-latest.yml # Latest version publisher
77
+ │ └── update-ibapi-stable.yml # Stable version publisher
78
+ ├── scripts/ # Automation scripts
79
+ │ ├── get_download_url.py # Fetch IB API download URLs
80
+ │ ├── update_ibapi.py # Download and commit IB API
81
+ │ └── check_and_update.py # Orchestrator (legacy)
82
+ ├── ibapi/ # IB API Python client (auto-updated)
83
+ │ └── ibapi/
84
+ │ ├── client.py
85
+ │ ├── wrapper.py
86
+ │ └── ...
87
+ ├── pyproject.toml # Package configuration
88
+ └── README.md
89
+ ```
90
+
91
+ ## 🔄 How It Works
92
+
93
+ ### Automated Workflow
94
+
95
+ 1. **Weekly Check**: GitHub Actions runs every Monday at 9:00 AM UTC
96
+ 2. **Version Detection**: Scrapes https://interactivebrokers.github.io/ for new versions
97
+ 3. **Download & Extract**: Downloads the TWS API zip and extracts the Python client
98
+ 4. **Auto-Fix**: Automatically fixes version strings and package configuration
99
+ 5. **Build & Publish**: Builds the package and publishes to PyPI
100
+ 6. **Tag & Release**: Creates git tags and GitHub releases
101
+
102
+ ### Version Management
103
+
104
+ - Versions follow IB's format: `10.40.01`, `10.37.02`, etc.
105
+ - Git tags: `v10.40.01`, `v10.37.02`, etc.
106
+ - PyPI packages:
107
+ - Latest: `ibapi-latest==10.40.01`
108
+ - Stable: `ibapi-stable==10.37.02`
109
+
110
+ ## 📝 License
111
+
112
+ This project has a **dual license structure**:
113
+
114
+ ### IB API Source Code (`ibapi/` directory)
115
+
116
+ The Interactive Brokers TWS API source code is proprietary software owned by Interactive Brokers LLC and is licensed under the **[TWS API Non-Commercial License](LICENSE)**.
117
+
118
+ **Key restrictions:**
119
+ - ✅ Use for personal trading and account management
120
+ - ✅ Develop internal proprietary tools for your own IB account
121
+ - ❌ **NOT permitted**: Selling software to third parties
122
+ - ❌ **NOT permitted**: Distributing software to generate indirect financial benefit (e.g., commissions)
123
+ - ⚠️ **Requires**: Active Interactive Brokers account
124
+
125
+ **For commercial use**, contact Interactive Brokers at: opensource@interactivebrokers.com
126
+
127
+ **Full license text**: See [LICENSE](LICENSE) file
128
+
129
+ ### Automation Scripts (`scripts/` directory, workflows)
130
+
131
+ The automation tooling that packages and publishes the IB API is licensed under the **MIT License**.
132
+
133
+ See the [LICENSE](LICENSE) file for complete details.
134
+
135
+ ## 🔗 Links
136
+
137
+ - **PyPI Packages**:
138
+ - Latest: https://pypi.org/project/ibapi-latest/
139
+ - Stable: https://pypi.org/project/ibapi-stable/
140
+ - **Official IB API**: https://interactivebrokers.github.io/tws-api
141
+ - **Documentation**: https://ibkrcampus.com/ibkr-api-page/
142
+ - **GitHub Repository**: https://github.com/yourusername/ibapi
143
+
144
+ ## 🐛 Support
145
+
146
+ For issues with:
147
+ - **The IB API itself**: Contact [Interactive Brokers](https://www.interactivebrokers.com/en/support/contact.php)
148
+ - **This package/automation**: Open an [issue on GitHub](https://github.com/yourusername/ibapi/issues)
149
+
150
+ ## ⚙️ Configuration
151
+
152
+ The package configuration is in `pyproject.toml`:
153
+
154
+ ```toml
155
+ [project]
156
+ name = "ibapi"
157
+ dynamic = ["version"] # Version from ibapi.__version__
158
+ dependencies = ["protobuf==5.29.3"]
159
+
160
+ [tool.setuptools]
161
+ packages = ["ibapi", "ibapi.protobuf"]
162
+ package-dir = {"" = "ibapi"} # Maps ibapi/ibapi/* to ibapi/*
163
+ ```
164
+
165
+ This ensures imports work as expected:
166
+ ```python
167
+ from ibapi.client import EClient # Not from ibapi.ibapi.client
168
+ ```
@@ -0,0 +1,16 @@
1
+ """
2
+ Copyright (C) 2023 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
3
+ and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable.
4
+ """
5
+
6
+ """ Package implementing the Python API for the TWS/IB Gateway """
7
+
8
+ VERSION = {"major": 10, "minor": 40, "micro": 1}
9
+
10
+
11
+ def get_version_string():
12
+ # Version string with preserved leading zeros
13
+ return "10.40.01"
14
+
15
+
16
+ __version__ = get_version_string()
@@ -0,0 +1,70 @@
1
+ """
2
+ Copyright (C) 2019 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
3
+ and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable.
4
+ """
5
+
6
+
7
+ class AccountSummaryTags:
8
+ AccountType = "AccountType"
9
+ NetLiquidation = "NetLiquidation"
10
+ TotalCashValue = "TotalCashValue"
11
+ SettledCash = "SettledCash"
12
+ AccruedCash = "AccruedCash"
13
+ BuyingPower = "BuyingPower"
14
+ EquityWithLoanValue = "EquityWithLoanValue"
15
+ PreviousDayEquityWithLoanValue = "PreviousDayEquityWithLoanValue"
16
+ GrossPositionValue = "GrossPositionValue"
17
+ ReqTEquity = "ReqTEquity"
18
+ ReqTMargin = "ReqTMargin"
19
+ SMA = "SMA"
20
+ InitMarginReq = "InitMarginReq"
21
+ MaintMarginReq = "MaintMarginReq"
22
+ AvailableFunds = "AvailableFunds"
23
+ ExcessLiquidity = "ExcessLiquidity"
24
+ Cushion = "Cushion"
25
+ FullInitMarginReq = "FullInitMarginReq"
26
+ FullMaintMarginReq = "FullMaintMarginReq"
27
+ FullAvailableFunds = "FullAvailableFunds"
28
+ FullExcessLiquidity = "FullExcessLiquidity"
29
+ LookAheadNextChange = "LookAheadNextChange"
30
+ LookAheadInitMarginReq = "LookAheadInitMarginReq"
31
+ LookAheadMaintMarginReq = "LookAheadMaintMarginReq"
32
+ LookAheadAvailableFunds = "LookAheadAvailableFunds"
33
+ LookAheadExcessLiquidity = "LookAheadExcessLiquidity"
34
+ HighestSeverity = "HighestSeverity"
35
+ DayTradesRemaining = "DayTradesRemaining"
36
+ Leverage = "Leverage"
37
+
38
+ AllTags = ",".join(
39
+ (
40
+ AccountType,
41
+ NetLiquidation,
42
+ TotalCashValue,
43
+ SettledCash,
44
+ AccruedCash,
45
+ BuyingPower,
46
+ EquityWithLoanValue,
47
+ PreviousDayEquityWithLoanValue,
48
+ GrossPositionValue,
49
+ ReqTEquity,
50
+ ReqTMargin,
51
+ SMA,
52
+ InitMarginReq,
53
+ MaintMarginReq,
54
+ AvailableFunds,
55
+ ExcessLiquidity,
56
+ Cushion,
57
+ FullInitMarginReq,
58
+ FullMaintMarginReq,
59
+ FullAvailableFunds,
60
+ FullExcessLiquidity,
61
+ LookAheadNextChange,
62
+ LookAheadInitMarginReq,
63
+ LookAheadMaintMarginReq,
64
+ LookAheadAvailableFunds,
65
+ LookAheadExcessLiquidity,
66
+ HighestSeverity,
67
+ DayTradesRemaining,
68
+ Leverage,
69
+ )
70
+ )