All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v1.0.0 - 2021-02-28
v1.0.0
is the first usable release of the framework. Accounts & orders
management features are now implemented, so as placing orders. It's a usable
framework for actual trading as of this release. However, it's NOT compatible
with pervious versions as a lot of the functions got revamped, including the
functions for fetching the historical data.
- Support of requesting and managing account & portfolio data.
- Support of requesting active orders & orders management (including order placing, cancellation, and order status updates, etc..).
- Connection status event listener to notify the connection status between the client program and IB TWS/Gateway.
- Handling for unexpected connection drops.
- Resources will be released and on-going tasks will all be terminated on disconnected.
- Corresponding interfaces for most if not all public classes for easy mocking, so it's gonna be easy to backtest the strategies and use the same set of strategy code for both backtest and live trading.
- Reordered the grouping of packages and modules (breaking change).
IBBridge.req_historical_ticks
now works as an async iterator.
- All deprecated functions.
- Deprecated script
cmd/fetch_us_historical_ticks.py
.
v0.2.0 - 2020-09-02
v0.2.0
is a minor release refactored most of the project to adopt async/await
syntax, added support of streaming live "tick-by-tick" data from IB, and
restructured the project.
- Module
ibpy_native.utils.datatype
to holdEnum
orTypedDict
for types of function arguments or return objects. - Listener to receive system notifications from IB (via
ibpy_native.interfaces.listeners.NotificationListener
) in public classibpy_native.bridge.IBBridge
.- Corresponding setter
set_on_notify_listener(listener)
.
- Corresponding setter
- Function
ibpy_native.bridge.IBBridge.search_detailed_contracts(contract)
to search for contracts with complete details from IB's database. This newly implemented function is recommended to replace the deprecated functionsget_us_stock_contract(symbol)
&get_us_future_contract(symbol, contract_month)
inIBBridge
. - Feature of streaming live "tick-by-tick" data from IB via functions
ibpy_native.bridge.IBBridge.stream_live_ticks(contract, listener, tick_type=ibpy_native.utils.datatype.LiveTicks.LAST)
andibpy_native.bridge.IBBridge.stop_live_ticks_stream(stream_id)
.
- Existing code to align the code style with Google Python Style Guide.
- Module files location to group them in corresponding sub-packages.
- Name of classes, variables, and functions to get rid of the prepended double underscore and prepended single underscore for all non-public classes/members to mark for internal usage.
- Mechanism of internal queue management.
- Minimum Python version requirement to
3.7
as some of the built-in feature of3.7
is being used in the project.
- Function
ibpy_native.bridge.IBBridge.get_us_stock_contract(symbol)
. - Function
ibpy_native.bridge.IBBridge.get_us_future_contract(symbol, contract_month)
. - Script
cmd/fetch_us_historical_ticks.py
. This script might be updated to work with the refactored functions in future release, but it's not usable for now.
- Argument
timeout
on all APIs implemented (use functionasyncio.wait_for(aw, timeout, *, loop=None)
for timeout instead if needed).
v0.1.4 - 2020-06-01
v0.1.4
is a hotfix release addressing the issue of various errors which will
be raised while fetching the historical ticks.
- Command option
--timeout
to scriptcmd/fetch_us_historical_ticks.py
. - Docstring to files in
/ibpy_native
. .pylintrc
file to control the Pylint behaviours.
### Changed
- The parameter
attempts
ofIBBridge.get_historical_ticks
now accepts value-1
to loop the IB APIreqHistoricalTicks
until all available ticks for the specified period are fetched.
### Removed
README
sectionKnown issues
as the only issue documented there has been fixed.
- Issue of
IBBridge.get_historical_ticks
will raise the errorcode: 200 - No security definition has been found for the request
in the middle of ticks fetching. - Issue of
IBBridge.get_historical_ticks
cannot finish fetching all available ticks of a future contract as IB keeps returning "Duplicate ticker ID" when fetching near the earliest available data point. - Incorrect time comparison between native datetime object
end
with aware datetime objecthead_timestamp
inIBBridge.get_historical_ticks
.
v0.1.3 - 2020-05-20
v0.1.3
is a minor release includes a script to fetch historical ticks of
US contracts for quick use.
- script
cmd/fetch_us_historical_ticks.py
to fetch historical ticks,
README
to introduce the usage of the newly included script.
- version in
setup.py
remains as0.1.2
as there is nothing changed for files included in the package released.
v0.1.2 - 2020-05-20
v0.1.2
is a minor hotfix release fixed the issue found immediately after the
release of v0.1.1
.
- Reminder to use newest version in
README
.
- Issue of the
next_end_time
defined inIBClient.fetch_historical_ticks
won't change to earlier0
or30
minutes if the currentnext_end_time
is already athh:00:00
orhh:30:00
by minus 30 minutes directly.
v0.1.1 - 2020-05-20
v0.1.1
is a minor hotfix release fixed the issue of
IBClient.fetch_historical_ticks
returns with finished
mark as True
unexpectedly.
README
sectionKnown issues
,Development status
&Contributions
.
start
is no longer an optional parameter for functionIBClient.fetch_historical_ticks
as the start time is needed to determine if it has fetched as many ticks as it should from IB.- The earliest available data point will be passed to function
IBClient.fetch_historical_ticks
asstart
value if functionIBBridge.get_historical_ticks
has valueNone
of its' parameterstart
to accomplish the changes made inIBClient.fetch_historical_ticks
described above.
- Issue of
IBClient.fetch_historical_ticks
breaks the API request loop and returns withfinished
mark asTrue
unexpectedly while IB returns less than 1000 records but there're more historical ticks those should be fetched in next request.