{"id":15009426,"url":"https://github.com/prograsaur/ib-historical-data","last_synced_at":"2025-04-09T17:23:51.229Z","repository":{"id":41451492,"uuid":"126267945","full_name":"Prograsaur/ib-historical-data","owner":"Prograsaur","description":"Interactive Brokers TWS API -- Historical data downloader","archived":false,"fork":false,"pushed_at":"2018-04-10T17:22:37.000Z","size":31,"stargazers_count":55,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T19:23:05.421Z","etag":null,"topics":["example-app","gui","ibapi","interactive-brokers","python-3","python-3-6","python-script","python3","tkinter","tws"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prograsaur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-22T02:26:53.000Z","updated_at":"2025-03-18T06:56:59.000Z","dependencies_parsed_at":"2022-09-21T08:50:28.394Z","dependency_job_id":null,"html_url":"https://github.com/Prograsaur/ib-historical-data","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prograsaur%2Fib-historical-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prograsaur%2Fib-historical-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prograsaur%2Fib-historical-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prograsaur%2Fib-historical-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prograsaur","download_url":"https://codeload.github.com/Prograsaur/ib-historical-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075474,"owners_count":21043591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example-app","gui","ibapi","interactive-brokers","python-3","python-3-6","python-script","python3","tkinter","tws"],"created_at":"2024-09-24T19:25:12.324Z","updated_at":"2025-04-09T17:23:51.207Z","avatar_url":"https://github.com/Prograsaur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interactive Brokers TWS API -- Historical bar data downloader\nInteractive Brokers TWS API usage example.\n\n\nTWS API Guide http://interactivebrokers.github.io/tws-api/#gsc.tab=0\n\n## Usage\n\n1. Configure the TWS (see below)\n2. Change ```config.py``` if necessary\n2. Run: ```pythonw main.py```\n\n## Interactive Brokers Trader Workstation configuration\n\nTo allow connection between your application and TWS you have to set several options in the TWS configuration:\n\nIn the TWS window:\n- File =\u003e Global configuration...\n- Configuration =\u003e API =\u003e Settings\n- [x] Enable ActiveX and Socket Clients\n- [ ] Read-Only API\n- [x] Download open orders on connection\n- Socket Port: 7497\n- [x] Expose entire trading schedule to API\n- [x] Let API account requests switch user-visible account subscription\n- Master API client ID: 0\n- [x] Allow connections from the localhost only\n\n## Configuration\n\nEdit config.py file directly to change the configuration.\n\n## Interactive Brokers Client class\n\nClient has to check not just messages from the TWS but messages from the GUI as well.\n\nTo do so I just copied the EClient.run() method body from the API code and\nadded onLoopIteration() hook call inside the EClient infinite loop.\n\nI'm using this hook to process messages from other sources (GUI), not just TWS.\n\nUncomment self.onIdle() to create another hook to process something while\nno messages are comming from the TWS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprograsaur%2Fib-historical-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprograsaur%2Fib-historical-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprograsaur%2Fib-historical-data/lists"}