{"id":18005666,"url":"https://github.com/areed1192/interactive-brokers-api","last_synced_at":"2025-03-26T10:32:13.383Z","repository":{"id":44890573,"uuid":"382417588","full_name":"areed1192/interactive-brokers-api","owner":"areed1192","description":"A python application used to interact with the Interactive Brokers REST API.","archived":false,"fork":false,"pushed_at":"2023-07-12T02:16:45.000Z","size":64,"stargazers_count":96,"open_issues_count":5,"forks_count":44,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-21T15:42:38.716Z","etag":null,"topics":["api","interactive-brokers","interactive-brokers-api","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/areed1192.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["areed1192"],"patreon":"sigmacoding","custom":null}},"created_at":"2021-07-02T17:27:10.000Z","updated_at":"2025-03-16T15:33:18.000Z","dependencies_parsed_at":"2022-08-01T01:38:52.880Z","dependency_job_id":null,"html_url":"https://github.com/areed1192/interactive-brokers-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"areed1192/sigma-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Finteractive-brokers-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Finteractive-brokers-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Finteractive-brokers-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Finteractive-brokers-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/areed1192","download_url":"https://codeload.github.com/areed1192/interactive-brokers-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245637209,"owners_count":20648109,"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":["api","interactive-brokers","interactive-brokers-api","python"],"created_at":"2024-10-30T00:21:01.714Z","updated_at":"2025-03-26T10:32:12.949Z","avatar_url":"https://github.com/areed1192.png","language":"Python","funding_links":["https://github.com/sponsors/areed1192","https://patreon.com/sigmacoding","https://www.patreon.com/sigmacoding"],"categories":[],"sub_categories":[],"readme":"# Unofficial Interactive Brokers API\n\n## Table of Contents\n\n- [Overview](#overview)\n- [What's in the API](#whats-in-the-api)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Documentation \u0026 Resources](#documentation-and-resources)\n- [Support These Projects](#support-these-projects)\n\n## Overview\n\nThe unofficial Python API client library for Interactive Broker Client Portal Web API allows individuals with Interactive Broker accounts to manage trades, pull historical and real-time data, manage their accounts, create and modify orders all using the Python programming language.\n\nInteractive Broker offers multiple APIs for their clients. If you would like to learn more about their API offerings click on the links below:\n\n- Trade Workstation API, please refer to the [official documentation](http://interactivebrokers.github.io/tws-api/)\n- Client Portal API, please refer to the [official documentation](https://interactivebrokers.github.io/cpwebapi/)\n- Third Party API, plesfe refer to the [official documentation](https://www.interactivebrokers.com/webtradingapi/)\n\n## Requirements\n\nThe following requirements must be met to use this API:\n\n- A Interactive Broker account, you'll need your account password and account number to use the API.\n- [Java 8](https://developers.redhat.com/products/openjdk/download) update 192 or higher installed (gateway is compatible with higher Java versions including OpenJDK 11).\n- Download the [Beta Client Portal Gateway](https://www.interactivebrokers.com/en/index.php?f=45185)\n\n## Setup\n\n**Setup - Requirements Install:***\n\nFor this particular project, you only need to install the dependencies, to use the project. The dependencies\nare listed in the `requirements.txt` file and can be installed by running the following command:\n\n```console\npip install -r requirements.txt\n```\n\nAfter running that command, the dependencies should be installed.\n\n**Setup - Local Install:**\n\nIf you are planning to make modifications to this project or you would like to access it\nbefore it has been indexed on `PyPi`. I would recommend you either install this project\nin `editable` mode or do a `local install`. For those of you, who want to make modifications\nto this project. I would recommend you install the library in `editable` mode.\n\nIf you want to install the library in `editable` mode, make sure to run the `setup.py`\nfile, so you can install any dependencies you may need. To run the `setup.py` file,\nrun the following command in your terminal.\n\n```console\npip install -e .\n```\n\nIf you don't plan to make any modifications to the project but still want to use it across\nyour different projects, then do a local install.\n\n```console\npip install .\n```\n\nThis will install all the dependencies listed in the `setup.py` file. Once done\nyou can use the library wherever you want.\n\n\u003c!-- **Setup - PyPi Install:**\n\nTo **install** the library, run the following command from the terminal.\n\n```console\npip install federal-register\n```\n\n**Setup - PyPi Upgrade:**\n\nTo **upgrade** the library, run the following command from the terminal.\n\n```console\npip install --upgrade federal-register\n``` --\u003e\n\n## Documentation and Resources\n\n- [Getting Started](https://interactivebrokers.github.io/cpwebapi/index.html#login)\n- [Endpoints](https://interactivebrokers.com/api/doc.html)\n- [Websockets](https://interactivebrokers.github.io/cpwebapi/RealtimeSubscription.html)\n\n## Usage\n\nHere is a simple example of using the `ibc-api` library.\n\n```python\nfrom pprint import pprint\nfrom configparser import ConfigParser\nfrom ibc.client import InteractiveBrokersClient\n\n# Initialize the Parser.\nconfig = ConfigParser()\n\n# Read the file.\nconfig.read('config/config.ini')\n\n# Get the specified credentials.\naccount_number = config.get('interactive_brokers_paper', 'paper_account')\naccount_password = config.get('interactive_brokers_paper', 'paper_password')\n\n# Initialize the client.\nibc_client = InteractiveBrokersClient(\n    account_number=account_number,\n    password=account_password\n)\n\n# Grab the Auth Service.\nauth_service = ibc_client.authentication\n\n# Login\nauth_service.login()\n\n# check if we are authenticated.\npprint(\n    auth_service.is_authenticated()\n)\n\n# Validate the current session.\npprint(\n    auth_service.sso_validate()\n)\n```\n\n## Support These Projects\n\n**Patreon:**\nHelp support this project and future projects by donating to my [Patreon Page](https://www.patreon.com/sigmacoding). I'm\nalways looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require me to\npay monthly fees.\n\n**YouTube:**\nIf you'd like to watch more of my content, feel free to visit my YouTube channel [Sigma Coding](https://www.youtube.com/c/SigmaCoding).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareed1192%2Finteractive-brokers-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fareed1192%2Finteractive-brokers-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareed1192%2Finteractive-brokers-api/lists"}