Changelog
0.9
Version 0.9.86
Version 0.9.85
Fixed: issue 586: Revert socket protocol back to version 176.
Version 0.9.84
Potential fix for
reqWshEventData.
Version 0.9.83
Added support for WSH (Wall Street Horizon) requests plus the (blocking) convenience methods
getWshMetaDataandgetWshEventData.Updated socket protocol to version 177.
Added support for
Eventsecurity type.
Version 0.9.82
Fixed: issue 534: Session parsing for Forex contracts.
Fixed: issue 536: Handle empty session field.
Fixed: issue 541: Remove superfluous closing bracket.
Fixed: issue 542: Use float size for
pnlSingle.Fixed: issue 544: Cancel head-time request after completion.
Fixed: issue 545: Return
Tradeinstead ofOrderforreqOpenOrdersandreqAllOpenOrders.pull 553: Volume bar added.
pull 565: Typo fix.
Version 0.9.81
Add
ContractDetails.tradingSessions()andContractDetails.liquidSessions()to parse session times.Fix
IBC.on2fatimeoutcommand line argument for Unix.
Version 0.9.80
Fix
ib.reqMatchingSymbolsto handle bond contracts.
Version 0.9.79
Fix datetime parsing.
Version 0.9.78
Added
accountparameter toib.portfolio().Added
IBC.on2fatimeoutfield.Removed obsolete
IBController.Fixed: issue 530: Use explicit timezone in requests as per new API requirement.
Version 0.9.77
pull 528: Fixes regression in
client.py.
Version 0.9.76
Fixed: issue 525: For
whatIfrequest treat error 110 as failure.
Version 0.9.75
Fixed: issue 524: Use fix from Papakipos for issue with
FlexReportdownloading.
Version 0.9.74
Fix
reqContractDetailsbug in combination with latest TWS.Update the code to comply with stricter MyPy checks.
Version 0.9.73
pull 523: Fix
completedOrderparsing for new socket protocol.
Version 0.9.72
pull 507: Fixes
bondContractDetailsrequest.Fixed: issue 502: Treat error 110 as a warning.
Added
manualOrderTimeandmanualCancelOrderTimefor audit trails.Added
PEG MIDandPEG BESTorder types.Added contract fields
descriptionandissuerId.Added
IB.reqUserInfo().Support socket protocol version 176.
Version 0.9.71
pull 453: Added support for
bidExchangeandaskExchangefields toTicker.pull 489:
Watchdog.start()now returns aFuture.Fixed: issue 439: Set
marketDataTypedirectly onTicker.Fixed: issue 441: Add explicit timezone of None to accomodate pandas Timestamp.
Fixed: issue 471: Revised
Ticker.marketPrice()calculation.Added
minTick,bboExchangeandsnapshotPermissionsfields toTicker.Added
minSize,sizeIncrementandsuggestedSizeIncrementfields toContractDetails.Added
IB.reqHistoricalSchedulerequest.Added
IB.reqSmartComponentsrequest.Added
Order.advancedErrorOverridefield. Any advanced error message is made availble fromTrade.advancedError.Added a recipe for integration with PyGame.
Minimum required TWSAPI client protocol version is 157 now.
Version 0.9.70
Fixed: issue 413: Set the appropriate events as done on disconnect.
Exported symbols are now static so that the VSCode/PyLance code analyzer can understand it.
Version 0.9.69
Fixed: issue 403: Change validity test for whatIfOrder response.
Version 0.9.68
Fixed: issue 402: Downloading historical ticks for crypto currencies.
Version 0.9.67
Cryptosecurity class added. To accommodate fractional crypto currency sizes, all the varioussizeandvolumefields that were of typeintare now of typefloat.pull 385: Get day trades remaining for next four days in
IB.accountSummary.Fixed: issue 361: Prevent
util.logToConsoleandutil.logToFilefrom messing with the root logger.Fixed: issue 370: Catch
asyncio.CancelledErrorduring connect.Fixed: issue 371: Fix type annotation for
reqMarketRuleAsync.Fixed: issue 380: Reject bogus
whatIforder response.Fixed: issue 389: Add
TradeLogEntry.errorCodefield.
Version 0.9.66
Version 0.9.65
Version 0.9.64
Version 0.9.63
Version 0.9.62
IB.TimezoneTWSfield added, for when the TWS timezone differs from the local system timezone (issue 287).IB.RaiseRequestErrorsfield added, can be set toTrueto raiseRequestErrorwhen certain requests fail, instead of returning empty data (pull 296).IB.accountSummaryAsync()method added (issue 267).Watchdog.probeContractfield added, to use a contract other then EURUSD for probing the data connection (issue 298).Ticker.rtTimeadded (issue 274, pull 275). Please note that this timestamp appears to be mostly bogus.Fixed issue 270: Clear ticker depth data when canceling market depth subscription.
Fixed issue with duplicate order IDs.
Version 0.9.61
Ticker.marketDataTypeadded to indicate the delayed/frozen status of thereqMktDataticks.
Version 0.9.60
IB.reqHistoricalData()has a newtimeoutparameter that automatically cancels the request after timing out.BracketOrderis iterable again.IB.waitOnUpdate()returnsFalseon timeout now.pull 210: Fix decoding of execDetails time.
pull 215: New scanner notebook added, courtesy of C. Valcarcel.
pull 220: Added
readonlyoption for Watchdog.Fixed issue 221: Delayed close ticks handling by
Ticker.Fixed issue 224: Added timeout for
completedOrdersrequest during connect.Fixed issue 227:
IB.MaxSyncedSubAccountsadded.Fixed issue 230: Fixed
IB.reqHistogramDatamethod.Fixed issue 235:
Order.discretionaryAmtis now of typefloat(wasint).Fixed issue 236:
ticker.updateEventis now fired for any change made to the ticker.Fixed issue 245: Emit
trade.statusEventwhen order is implicitly canceled by a problem.You can now sponsor the development of IB-insync!
Version 0.9.59
PR #205 adds more typing annotations.
dataclassesare now used for objects (instead of inheriting from a baseObject). For Python 3.6.* install it withpip install dataclasses
Version 0.9.58
PR #196 treats error 492 as a warning so that scanner results can still be used.
Version 0.9.57
PR #184, #185 and #186 add the new Ticker fields
rtTradeVolume,auctionVolume,auctionPriceandauctionImbalance.PR #191 lets
util.schedulereturn a handle that can be canceled.PR #192 adds
throttleStartandthrottleEndevents to theClient.PR #194 adds better JSON support for
namedtupleobjects.
Version 0.9.56
Fix bug #178:
Order.totalQuantityis now float.
Version 0.9.55
Sphinx update for documentation.
Version 0.9.54
ContractDetails.stockTypeadded.Fixed
Trade.filled()for combo (BAG) contracts.Server version check added to make sure TWS/gateway version is at least 972.
Version 0.9.53
Fix bug #155 (IB.commissionReportEvent not firing).
Help editors with the code completion for Events.
Version 0.9.52
Fix Client.exerciseOptions (bug #152).
Version 0.9.51
Fix
ib.placeOrderfor older TWS/gateway versions.Better handling of unclean disconnects.
Version 0.9.50
Fix
execDetailsEventregression.Added
readonlyargument toib.connectmethod. Set this toTruewhen the API is in read-only mode.
Version 0.9.49
ib.reqCompletedOrders()request added (requires TWS/gateway >= 976). Completed orders are automatically synced on connect and are available fromib.trades(), complete with fills and commission info.Fixed bug #144.
Version 0.9.48
Ticker.haltedfield added.Client.reqFundamentalDatafixed.
Version 0.9.47
ibapipackage from IB is no longer needed, ib_insync handles its own socket protocol encoding and decoding now.Documentation moved to readthedocs as rawgit will cease operation later this year.
Blocking requests will now raise
ConnectionErroron a connection failure. This also goes forutil.run,util.timeRange, etc.
Version 0.9.46
Eventclass has been replaced with the one from eventkit.Event-driven bar construction from ticks added (via
Ticker.updateEvent)Fixed bug #136.
Default request throttling is now 45 requests/s for compatibility with TWS/gateway 974 and higher.
Version 0.9.45
Event.merge()added.TagValueserialization fixed.
Version 0.9.44
Event.any()andEvent.all()added.Ticker fields added:
tradeCount,tradeRate,volumeRate,avOptionVolume,markPrice,histVolatility,impliedVolatility,rtHistVolatilityandindexFuturePremium.Parse
ticker.fundamentalRatiosintoFundamentalRatiosobject.util.timeRangeAsync()andwaitUntilAsync()added.ib.pendingTickersEventnow emits asetof Tickers instead of alist.Tick handling has been streamlined.
For harvesting tick data, an imperative code style with a
waitOnUpdateloop should not be used anymore!
Version 0.9.43
Fixed issue #132.
Event.aiter()added, all events can now be used as asynchronous iterators.Event.wait()added, all events are now also awaitable.Decreased default throttling to 95 requests per 2 sec.
Version 0.9.42
Ticker.shortableSharesadded (for use with generic tick 236).ib.reqAllOpenOrders()request added.tickByTick subscription will update ticker’s bid, ask, last, etc.
Drop redundant bid/ask ticks from
reqMktData.Fixed occasional “Group name cannot be null” error message on connect.
Watchdogcode rewritten to not needutil.patchAsyncio.Watchdog.start()is no longer blocking.
Version 0.9.41
Fixed bug #117.
Fixed order modifications with TWS/gateway 974.
Version 0.9.40
Ticker.fundamentalRatiosadded (for use with generic tick 258).Fixed
reqHistoricalTickswith MIDPOINT.
Version 0.9.39
Handle partially filled dividend data.
Use
secType='WAR'for warrants.
Version 0.9.38
ibapi v97.4 is now required.
fixed tickByTick wrappers.
Version 0.9.37
Backward compatibility with older ibapi restored.
Version 0.9.36
Compatibility with ibapi v974.
Client.setConnectOptions()added (for PACEAPI).
Version 0.9.35
Ticker.hasBidAsk()added.IB.newsBulletinEventadded.Various small fixes.
Version 0.9.34
Old event system (ib.setCallback) removed.
Compatibility fix with previous ibapi version.
Version 0.9.33
Market scanner subscription improved.
IB.scannerDataEventnow emits the full list of ScanData.ScanDataListadded.
Version 0.9.32
Autocompletion with Jedi plugin as used in Spyder and VS Code working again.
Version 0.9.31
Request results will return specialized contract types (like
Stock) instead of genericContract.IB.scannerDataEventadded.ContractDetailsfieldsummaryrenamed tocontract.isSmartDepthparameter added forreqMktDepth.Event loop nesting is now handled by the nest_asyncio project.
util.useQtis rewritten so that it can be used with any asyncio event loop, with support for both PyQt5 and PySide2. It does not use quamash anymore.Various fixes, extensive documentation overhaul and flake8-compliant code formatting.
Version 0.9.30
Watchdog.stop()will not trigger restart now.Fixed bug #93.
Version 0.9.29
util.patchAsyncio()updated for Python 3.7.
Version 0.9.28
IB.RequestTimeoutadded.util.schedule()accepts tz-aware datetimes now.Let
client.disconnect()complete when no event loop is running.
Version 0.9.27
Fixed bug #77.
Version 0.9.26
PR #74 merged (
ib.reqCurrentTime()method added).Fixed bug with order error handling.
Version 0.9.25
Default throttling rate now compatible with reqTickers.
Fixed issue with
ib.waitOnUpdate()in combination. withib.pendingTickersEvent.Added timeout parameter for
ib.waitOnUpdate().
Version 0.9.24
ticker.futuresOpenInterestadded.execution.timewas string, is now parsed to UTC datetime.ib.reqMarketRule()request added.
Version 0.9.23
Compatability with Tornado 5 as used in new Jupyter notebook server.
Version 0.9.22
updated
ib.reqNewsArticleandib.reqHistoricalNewsto ibapi v9.73.07.
Version 0.9.21
updated
ib.reqTickByTickData()signature to ibapi v9.73.07 while keeping backward compatibility.
Version 0.9.20
Fixed watchdog bug.
Version 0.9.19
Don’t overwrite
exchange='SMART'in qualifyContracts.
Version 0.9.18
Merged PR #65 (Fix misnamed event).
Version 0.9.17
New IB events
disconnectedEvent,newOrderEvent,orderModifyEventandcancelOrderEvent.Watchdogimprovements.
Version 0.9.16
New event system that will supersede
IB.setCallback().Notebooks updated to use events.
Watchdogmust now be given anIBinstance.
Version 0.9.15
Fixed bug in default order conditions.
Fixed regression from v0.9.13 in
placeOrder.
Version 0.9.14
Fixed
orderStatuscallback regression.
Version 0.9.13
Log handling improvements.
ClientwithclientId=0can now manage manual TWS orders.Clientwith master clientId can now monitor manual TWS orders.
Version 0.9.12
Run
IBCandIBControllerdirectly instead of via shell.
Version 0.9.11
Fixed bug when collecting ticks using
ib.waitOnUpdate().Added
ContFutureclass (continuous futures).Added
Ticker.midpoint().
Version 0.9.10
ib.accountValues()fixed for use with multiple accounts.
Version 0.9.9
Fixed issue #57
Version 0.9.8
Fix for
ib.reqPnLSingle().
Version 0.9.7
Profit and Loss (PnL) funcionality added.
Version 0.9.6
IBCadded.PR #53 (delayed greeks) merged.
Ticker.futuresOpenInterestfield removed.
Version 0.9.5
Fixed canceling bar and tick subscriptions.
Version 0.9.4
Fixed issue #49.
Version 0.9.3
Watchdogclass added.ib.setTimeout()added.Ticker.dividendsadded for use withgenericTickList456.Errors and warnings will now log the contract they apply to.
IBerror()callback signature changed to include contract.Fix for issue #44.
Version 0.9.2
Historical ticks and realtime bars now return time in UTC.
Version 0.9.1
IBControlleradded.openOrdercallback added.default arguments for
ib.connect()andib.reqMktData().
Version 0.9.0
minimum API version is v9.73.06.
tickByTicksupport.automatic request throttling.
ib.accountValues()now works for multiple accounts.AccountValue.modelCodeadded.Ticker.rtVolumeadded.
0.8
Version 0.8.17
workaround for IBAPI v9.73.06 for
Contract.lastTradeDateOrContractMonthformat.
Version 0.8.16
util.tree()method added.errorcallback signature changed to(reqId, errorCode, errorString).accountValueandaccountSummarycallbacks added.
Version 0.8.15
util.useQt()fixed for use with Windows.
Version 0.8.14
Fix for
ib.schedule().
Version 0.8.13
Import order conditions into ib_insync namespace.
util.useQtAlt()added for using nested event loops on Windows with Qtlib.schedule()added.
Version 0.8.12
Fixed conditional orders.
Version 0.8.11
FlexReportadded.
Version 0.8.10
Fixed issue #22.
Version 0.8.9
Ticker.vwapfield added (for use with generic tick 233).Client with master clientId can now monitor orders and trades of other clients.
Version 0.8.8
barUpdateevent now used also forreqRealTimeBarsresponsesreqRealTimeBarswill returnRealTimeBarListinstead of list.realtime bars example added to bar data notebook.
fixed event handling bug in
Wrapper.execDetails.
Version 0.8.7
BarDataListnow used withreqHistoricalData; it also stores the request parameters.updated the typing annotations.
added
barUpdateevent toIB.bar- and tick-data notebooks updated to use callbacks for realtime data.
Version 0.8.6
ticker.marketPriceadjusted to ignore price of -1.ticker.avVolumehandling fixed.
Version 0.8.5
realtimeBarwrapper fix.context manager for
IBandIB.connect().
Version 0.8.4
compatibility with upcoming ibapi changes.
added
errorevent toIB.notebooks updated to use
loopUntil.small fixes and performance improvements.
Version 0.8.3
new
IB.reqHistoricalTicks()API method.new
IB.loopUntil()method.fixed issues #4, #6, #7.
Version 0.8.2
fixed swapped
ticker.putOpenInterestvsticker.callOpenInterest.
Version 0.8.1
fixed
wrapper.tickSizeregression.
Version 0.8.0
support for realtime bars and
keepUpToDatefor historical barsadded option greeks to
Ticker.new
IB.waitUntil()andIB.timeRange()scheduling methods.notebooks no longer depend on PyQt5 for live updates.
notebooks can be run in one go (‘run all’).
tick handling bypasses ibapi decoder for more efficiency.
0.7
Version 0.7.3
IB.whatIfOrder()added.Added detection and warning about common setup problems.
Version 0.7.2
Removed import from ipykernel.
Version 0.7.1
Removed dependencies for installing via pip.
Version 0.7.0
added lots of request methods.
order book (DOM) added.
notebooks updated.
0.6
Version 0.6.1
Added UTC timezone to some timestamps.
Fixed issue #1.
Version 0.6.0
Initial release.