Skip to content

v0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@iamWing iamWing released this 02 Sep 07:27
· 180 commits to master since this release

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.

Added:

  • Module ibpy_native.utils.datatype to hold Enum or TypedDict for types of function arguments or return objects.
  • Listener to receive system notifications from IB (via ibpy_native.interfaces.listeners.NotificationListener) in public class ibpy_native.bridge.IBBridge.
    • Corresponding setter set_on_notify_listener(listener).
  • 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 functions get_us_stock_contract(symbol) & get_us_future_contract(symbol, contract_month) in IBBridge.
  • 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) and ibpy_native.bridge.IBBridge.stop_live_ticks_stream(stream_id).

Changed:

  • 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 of 3.7 is being used in the project.

Deprecated:

  • 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.

Removed:

  • Argument timeout on all APIs implemented (use function asyncio.wait_for(aw, timeout, *, loop=None) for timeout instead if needed).