Skip to content

Commit

Permalink
Freeze version 0.1.0, requiring IB API <= v9.72 and swigibpy==0.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Liu committed Sep 2, 2017
1 parent 5848513 commit 9e12b4a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 82 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
IBstract
========

IBstract is a high-level Pythonic interface to Interactive Brokers API,
wrapping historical and real-time market data access, as well as orders and
account management. The ultimate goal of Ibstract is to provide an easy-to-use
Pythonic IB interface for individual algorithmic back-testing and trading.
IBstract is a high-level Python library wrapping Interactive Brokers API,
providing historical data download, real-time market data streaming, and orders
and account management. The goal of Ibstract is to provide an easy-to-use
Pythonic IB interface for algorithmic trading and back-testing.


Features
----------
- Read and write historical and market data in pandas formats.
- Automatically merge and manage downloaded data by symbols, bar size and date/time.
- Store and cache historical data locally using sqlite.
- Real-time market data streaming and common technical signal generating. (To do)
- Order submission, status monitoring, and logging. (To do)
- Account management report and performance analysis. (To do)


Requirements
------------
- Interactive Brokers API <= 9.72
- Interactive Brokers Gateway >= 959, <= 963.3h
- Python >= 3.6 (Recommend Anaconda 4.4.0)
- pandas >= 0.20.0
- sqlite >= 3.13
- SQLAlchemy >= 1.1.9


References
----------
- [Rob Carver's Blog](http://qoppac.blogspot.co.uk/2017/03/interactive-brokers-native-python-api.html)
- [Interactive Brokers TWS API v9.72+](http://interactivebrokers.github.io/tws-api/)
- [Rob Carver: Using swigibpy so that Python will play nicely with Interactive Brokers API](https://qoppac.blogspot.com/2014/03/using-swigibpy-so-that-python-will-play.html)
- [Interactive Brokers API References v9.72](http://xavierib.github.io/twsapidocs/)
16 changes: 9 additions & 7 deletions ibstract/ibgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,18 +383,18 @@ def finished_flag(start_time):

# test 2
if (not sys.argv[1:]) or (int(sys.argv[1]) == 2):
security_type = 'OPT'
security_type = 'STK'
symbol = 'FB'
put_call = 'CALL'
strike = 121
expiry = '20161021'
req_endtime = '20160920 13:00:00'
# put_call = 'CALL'
# strike = 170
# expiry = '20170915'
req_endtime = '20170831 13:00:00'
req_len = '1 day'
req_barsize = '5 min'
req_datatype = 'TRADES'

req_contract = ibc.make_contract(
security_type, symbol, put_call, strike, expiry)
security_type, symbol) # , put_call, strike, expiry)
hist_data_list = ibc.req_hist_data(
req_contract, req_endtime, req_len, req_barsize, req_datatype)
hist_data = MarketData(hist_data_list)
Expand All @@ -412,7 +412,9 @@ def finished_flag(start_time):
ticktype_names = ['mkt_price', ]

contract = ibc.make_contract(security_type, symbol)
hist_data_list = ibc.req_mkt_data(contract, duration=duration)
mkt_data_list = ibc.req_mkt_data(contract, duration=duration)
mkt_data = MarketData(mkt_data_list)
print(mkt_data.depot)

# close connection
ibc.ec.eDisconnect()
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

Empty file removed tests/__init__.py
Empty file.
11 changes: 0 additions & 11 deletions tests/context.py

This file was deleted.

21 changes: 0 additions & 21 deletions tests/test_data_access.py

This file was deleted.

21 changes: 0 additions & 21 deletions tests/test_streaming.py

This file was deleted.

0 comments on commit 9e12b4a

Please sign in to comment.