All Projects → Prograsaur → ib-historical-data

Prograsaur / ib-historical-data

Licence: GPL-3.0 license
Interactive Brokers TWS API -- Historical data downloader

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ib-historical-data

ib
Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)
Stars: ✭ 94 (+135%)
Mutual labels:  tws, interactive-brokers, ibapi
InterReact
Interactive Brokers reactive C# API.
Stars: ✭ 28 (-30%)
Mutual labels:  tws, interactive-brokers, ibapi
Tkinter-Designer
An easy and fast way to create a Python GUI 🐍
Stars: ✭ 4,697 (+11642.5%)
Mutual labels:  python-script, tkinter
Github-Environment-Cleaner
An interactive script to clean up GitHub environments
Stars: ✭ 101 (+152.5%)
Mutual labels:  python-script
Python-project-Scripts
This repositories contains a list of python scripts projects from beginner level advancing slowly. More code snippets to be added soon. feel free to clone this repo
Stars: ✭ 627 (+1467.5%)
Mutual labels:  python-script
funny-words
A Python script that generates a list of pairs of funny words for naming things such as app releases, internal projects, servers and children.
Stars: ✭ 26 (-35%)
Mutual labels:  python-script
test-case-generator
Test Case generator for competitive coding. Test case generator for competitive programming and potentially for software testing.
Stars: ✭ 28 (-30%)
Mutual labels:  tkinter
Pycraft
Pycraft is the OpenGL, open world, video game made entirely with Python. This project is a game to shed some light on OpenGL programming in Python as it is a seldom touched area of Python's vast amount of uses. Feel free to give this project a run, and message us if you have any feedback!
Stars: ✭ 39 (-2.5%)
Mutual labels:  tkinter
Open-Manager
如何管理杂乱的电脑桌面和一大堆的浏览器收藏网址?我用python写了一个工具,迅速提高工作效率。
Stars: ✭ 41 (+2.5%)
Mutual labels:  tkinter
JGetFund
Mac OS 开机自动执行脚本,爬取基金数据。
Stars: ✭ 15 (-62.5%)
Mutual labels:  python-script
WiCrackFi
Python Script to help/automate the WiFi hacking exercises.
Stars: ✭ 61 (+52.5%)
Mutual labels:  python-script
ARF-Converter
Bulk ARF file converter
Stars: ✭ 15 (-62.5%)
Mutual labels:  tkinter
djangify
A Python script that converts HTML Files / Templates to Django compatible HTML Templates.
Stars: ✭ 54 (+35%)
Mutual labels:  python-script
PyGraphicsGui
A "CookieCutter" for a Pythonic GUI with custom graphics - clone this to jump-start your project and learn how to integrate between ModernGL and Tkinter on Python3.6.
Stars: ✭ 30 (-25%)
Mutual labels:  tkinter
IB.CSharpApiClient
Interactive Brokers - TWS API simplified client
Stars: ✭ 41 (+2.5%)
Mutual labels:  interactive-brokers
Efficient-office
Alfred-Workflows,Vim,Script,Mac
Stars: ✭ 36 (-10%)
Mutual labels:  python-script
pyGISS
📡 A lightweight GIS Software in less than 100 lines of code
Stars: ✭ 114 (+185%)
Mutual labels:  tkinter
tukaan
A modern, cross platform Python toolkit for creating desktop GUI applications. Contributors are welcome!
Stars: ✭ 97 (+142.5%)
Mutual labels:  tkinter
the-seinfeld-chronicles
A dataset for textual analysis on arguably the best written comedy television show ever.
Stars: ✭ 14 (-65%)
Mutual labels:  python-script
yii2-realtime-chat-example
Yii2 simple realtime chat with websocket.io
Stars: ✭ 17 (-57.5%)
Mutual labels:  example-app

Interactive Brokers TWS API -- Historical bar data downloader

Interactive Brokers TWS API usage example.

TWS API Guide http://interactivebrokers.github.io/tws-api/#gsc.tab=0

Usage

  1. Configure the TWS (see below)
  2. Change config.py if necessary
  3. Run: pythonw main.py

Interactive Brokers Trader Workstation configuration

To allow connection between your application and TWS you have to set several options in the TWS configuration:

In the TWS window:

  • File => Global configuration...
  • Configuration => API => Settings
  • Enable ActiveX and Socket Clients
  • Read-Only API
  • Download open orders on connection
  • Socket Port: 7497
  • Expose entire trading schedule to API
  • Let API account requests switch user-visible account subscription
  • Master API client ID: 0
  • Allow connections from the localhost only

Configuration

Edit config.py file directly to change the configuration.

Interactive Brokers Client class

Client has to check not just messages from the TWS but messages from the GUI as well.

To do so I just copied the EClient.run() method body from the API code and added onLoopIteration() hook call inside the EClient infinite loop.

I'm using this hook to process messages from other sources (GUI), not just TWS.

Uncomment self.onIdle() to create another hook to process something while no messages are comming from the TWS.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].