Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
iamWing committed Feb 28, 2021
2 parents e01da67 + baab4e6 commit 0ceacba
Show file tree
Hide file tree
Showing 51 changed files with 5,081 additions and 2,332 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [iamWing]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/iamWing0w0']
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ disable=print-statement,
comprehension-escape,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-locals,
no-self-use

Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [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.

### Added
- 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.

### Changed
- Reordered the grouping of packages and modules (breaking change).
- `IBBridge.req_historical_ticks` now works as an async iterator.

### Removed
- 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
Expand Down Expand Up @@ -127,7 +155,8 @@ returns with `finished` mark as `True` unexpectedly while IB returns less than
1000 records but there're more historical ticks those should be fetched
in next request.

[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v1.0.0...HEAD
[v1.0.0]: https://github.com/Devtography/ibpy_native/compare/v1.0.0...v0.2.0
[v0.2.0]: https://github.com/Devtography/ibpy_native/compare/v0.2.0...v0.1.4
[v0.1.4]: https://github.com/Devtography/ibpy_native/compare/v0.1.4...v0.1.3
[v0.1.3]: https://github.com/Devtography/ibpy_native/compare/v0.1.3...v0.1.2
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ verify_ssl = true
[dev-packages]
rope = "*"
yapf = "*"
pandas = "*"
pylint = "*"
pipenv-setup = "*"
twine = "*"

[packages]
pytz = "*"
typing-extensions = "*"
pandas = "*"
deprecated = "*"

[requires]
Expand Down
504 changes: 283 additions & 221 deletions Pipfile.lock

Large diffs are not rendered by default.

53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
A fully asynchronous framework for using the native Python version of
Interactive Brokers API.

The whole framework is built on Python's built in `asyncio` and `queue` modules,
no event emitter nor any other heavy 3rd party library. The only 3rd party
package used is `pytz` for timezone related things. In this way the framework
is being kept as native Python as possible and the performance shouldn't get
slowed down due to the libraries used.

Additionally, most if not all public classes implement their corresponding
interface. Therefore, it's easy to implement a customised version for most of
the classes. Hence, mocking the API calls/data returns for backtest can be
easily done, and you should be able to use the same set of strategy code on both
simulate and live trading sessions.

## Installation
Install from PyPI
```sh
Expand Down Expand Up @@ -52,23 +64,31 @@ head_timestamp = await bridge.get_earliest_data_point(
)
```

For more, please have a look on the sample scripts in `samples` folder. There's
one script that shows how to request for historical tick data atm, but there
will be more as I keep developing my own system based on this framework.

In the meantime, you may want to read the doc and checkout the unittest for the
ideas of how the APIs work.

_**Do make sure you are using a paper account while running the unittest cases,
as some of those tests do place real orders to IB and orders will get filled.**_

## System requirements
- Python >= 3.7; Pervious versions are not supported (development is based on
Python 3.7.7)
Python 3.7.9)
- _Included IB API version - `9.79.01`_

## Development status (a.k.a. Words from developers)
Although the project is under the stage of active development, up until now
(`v0.2.0`) it focuses on working with FX, stock & future contracts from IB.
(`v1.0.0`) it focuses on working with FX, stock & future contracts from IB.
Other security types (e.g. options) may work but those are not yet tested.

This project is not providing full features of IB API yet, but basic features
like retrieving data of contracts from IB, getting live & historical ticks are
ready to be used. Remaining features like retrieving account details, place &
modify orders are planned to be implemented prior the first stable release
(`v1.0.0`), but there is no estimated timeline for those atm, as the project is
being developed alongside Devtography internal algo-trading program, so as my
daily job. For now, the features will be developed and released when needed.
This project is not providing full features of IB API yet, but `v1.0.0` is
already capable to retrieve & manage account and orders data, placing and
cancelling the orders, so as requesting historical and live tick data. More
features will be supported if my internal trading system needs (that's the
highest priority), or by request on the issues board.

## Contributions
Contributions via pull requests are welcome and encouraged. If there's any
Expand All @@ -78,6 +98,18 @@ make a pull request :)
_Please follow the [Google Python Style Guide] as much as possible for all the
code included in your pull request. Otherwise the pull request may be rejected._

## Donation
This framework has spent me a whole year to develop from scratch until the first
stable release (`v1.0.0`). Hopefully you'll find this framework useful as much
as I do.

If you wanna support my work, please consider [donate/sponsor] me. Thus I can
keep on investing time to further develop the framework alongside my job and
other projects.

## Author
[Wing Chau] [@Devtography]

## License
Modules included in `ibpy_native`, except `ibapi` is licensed under the
[Apache License, Version 2.0](LICENSE.md).
Expand All @@ -93,4 +125,7 @@ application/product, you must contact Interactive Brokers LLC for permission
of using IB API commercially.

[Google Python Style Guide]: https://google.github.io/styleguide/pyguide.html
[donate/sponsor]: https://github.com/sponsors/iamWing
[Wing Chau]: https://github.com/iamWing
[@Devtography]: https://github.com/Devtography
[TWS API Non-Commercial License]: https://interactivebrokers.github.io/index.html
Loading

0 comments on commit 0ceacba

Please sign in to comment.