ibcp


Nameibcp JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/matthewmoorcroft/ibcp
SummaryPython Wrapper for Interactive Brokers API
upload_time2025-09-01 09:40:21
maintainerNone
docs_urlNone
authorMatt
requires_python>=3.6
licenseNone
keywords interactive brokers api trading
VCS
bugtrack_url
requirements requests urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
IBCP: Python Wrapper for Interactive Brokers API
================================================

.. image:: https://img.shields.io/pypi/v/ibcp
   :target: https://pypi.org/pypi/ibcp/
.. image:: https://img.shields.io/pypi/pyversions/ibcp
   :target: https://pypi.org/pypi/ibcp/
.. image:: https://img.shields.io/pypi/l/ibcp
   :target: https://pypi.org/pypi/ibcp/
.. image:: https://readthedocs.org/projects/ibcp/badge/?version=latest
   :target: https://ibcp.readthedocs.io/en/latest/?badge=latest

.. figure:: https://raw.githubusercontent.com/matthewmoorcroft/ibcp/main/docs/logo.png
   :alt: Logo for 'IBCP'
   :align: center

   "Logo for 'IBCP'"

Overview
--------

|   IBCP is an unofficial python wrapper for `Interactive Brokers Client Portal Web API <https://interactivebrokers.github.io/cpwebapi/>`__. The motivation for the project was to build a Python wrapper
|   that is easy to use and understand.

Please see https://ibcp.readthedocs.io for the full documentation.

Features
--------

- Simple REST API wrapper
- Easy to use and understand
- Supports all Interactive Brokers Client Portal Web API endpoints
- Handles authentication and session management
- Supports both SSL and non-SSL connections

Requirements
------------

IBCP assumes a gateway session is active and authenticated.

Installation
------------

IBCP was developed under the `Voyz/IBeam <https://github.com/voyz/ibeam>`__ docker image environment.

Once a gateway session is running, ``pip`` command can be used to install IBCP:

.. code-block:: bash

   pip install ibcp

Usage
--------

.. code-block:: python

   import ibcp

   ib = ibcp.REST() # default parameters: url="https://localhost:5000", ssl=False

   # Get account information
   account = ib.get_account()

   # Get portfolio
   portfolio = ib.get_portfolio()

   # Get positions
   positions = ib.get_positions()

   # Get orders
   orders = ib.get_orders()

   # Get trades
   trades = ib.get_trades()

   # Get market data
   market_data = ib.get_market_data("AAPL")

   # Place order
   order = ib.place_order({
       "symbol": "AAPL",
       "secType": "STK",
       "currency": "USD",
       "exchange": "SMART",
       "tif": "DAY",
       "side": "BUY",
       "totalQuantity": 100,
       "orderType": "MKT"
   })

For the complete reference, please visit https://ibcp.readthedocs.io/en/latest/reference.html.

Configuration
-------------

By default, IBCP assumes the gateway session is open at https://localhost:5000 without an SSL certificate. A custom URL and SSL certificate can be set by:

.. code-block:: python

   ib = ibcp.REST(url="https://localhost:5000", ssl=False)

Documentation of available functions is at https://ibcp.readthedocs.io/en/latest/reference.html.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/matthewmoorcroft/ibcp",
    "name": "ibcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "interactive brokers, api, trading",
    "author": "Matt",
    "author_email": "matt@example.com",
    "download_url": "https://files.pythonhosted.org/packages/8f/5a/faf0e40e170f2cc1eff2c54157916f6da6356f80119ad555e8224a7c721f/ibcp-0.0.3.tar.gz",
    "platform": null,
    "description": "\nIBCP: Python Wrapper for Interactive Brokers API\n================================================\n\n.. image:: https://img.shields.io/pypi/v/ibcp\n   :target: https://pypi.org/pypi/ibcp/\n.. image:: https://img.shields.io/pypi/pyversions/ibcp\n   :target: https://pypi.org/pypi/ibcp/\n.. image:: https://img.shields.io/pypi/l/ibcp\n   :target: https://pypi.org/pypi/ibcp/\n.. image:: https://readthedocs.org/projects/ibcp/badge/?version=latest\n   :target: https://ibcp.readthedocs.io/en/latest/?badge=latest\n\n.. figure:: https://raw.githubusercontent.com/matthewmoorcroft/ibcp/main/docs/logo.png\n   :alt: Logo for 'IBCP'\n   :align: center\n\n   \"Logo for 'IBCP'\"\n\nOverview\n--------\n\n|   IBCP is an unofficial python wrapper for `Interactive Brokers Client Portal Web API <https://interactivebrokers.github.io/cpwebapi/>`__. The motivation for the project was to build a Python wrapper\n|   that is easy to use and understand.\n\nPlease see https://ibcp.readthedocs.io for the full documentation.\n\nFeatures\n--------\n\n- Simple REST API wrapper\n- Easy to use and understand\n- Supports all Interactive Brokers Client Portal Web API endpoints\n- Handles authentication and session management\n- Supports both SSL and non-SSL connections\n\nRequirements\n------------\n\nIBCP assumes a gateway session is active and authenticated.\n\nInstallation\n------------\n\nIBCP was developed under the `Voyz/IBeam <https://github.com/voyz/ibeam>`__ docker image environment.\n\nOnce a gateway session is running, ``pip`` command can be used to install IBCP:\n\n.. code-block:: bash\n\n   pip install ibcp\n\nUsage\n--------\n\n.. code-block:: python\n\n   import ibcp\n\n   ib = ibcp.REST() # default parameters: url=\"https://localhost:5000\", ssl=False\n\n   # Get account information\n   account = ib.get_account()\n\n   # Get portfolio\n   portfolio = ib.get_portfolio()\n\n   # Get positions\n   positions = ib.get_positions()\n\n   # Get orders\n   orders = ib.get_orders()\n\n   # Get trades\n   trades = ib.get_trades()\n\n   # Get market data\n   market_data = ib.get_market_data(\"AAPL\")\n\n   # Place order\n   order = ib.place_order({\n       \"symbol\": \"AAPL\",\n       \"secType\": \"STK\",\n       \"currency\": \"USD\",\n       \"exchange\": \"SMART\",\n       \"tif\": \"DAY\",\n       \"side\": \"BUY\",\n       \"totalQuantity\": 100,\n       \"orderType\": \"MKT\"\n   })\n\nFor the complete reference, please visit https://ibcp.readthedocs.io/en/latest/reference.html.\n\nConfiguration\n-------------\n\nBy default, IBCP assumes the gateway session is open at https://localhost:5000 without an SSL certificate. A custom URL and SSL certificate can be set by:\n\n.. code-block:: python\n\n   ib = ibcp.REST(url=\"https://localhost:5000\", ssl=False)\n\nDocumentation of available functions is at https://ibcp.readthedocs.io/en/latest/reference.html.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python Wrapper for Interactive Brokers API",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/matthewmoorcroft/ibcp/issues",
        "Homepage": "https://github.com/matthewmoorcroft/ibcp"
    },
    "split_keywords": [
        "interactive brokers",
        " api",
        " trading"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "914ba87dfc98958263be4fdd4c7aa4924da46b4ad91d83bfb30660dc9de9b33e",
                "md5": "5ac1075b45546d6b60fd89b5a591fbf2",
                "sha256": "0916127cd9f0edf1b9b32702272982aabc35280fd7a9423d509446a69d4a3f46"
            },
            "downloads": -1,
            "filename": "ibcp-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ac1075b45546d6b60fd89b5a591fbf2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7091,
            "upload_time": "2025-09-01T09:40:19",
            "upload_time_iso_8601": "2025-09-01T09:40:19.307386Z",
            "url": "https://files.pythonhosted.org/packages/91/4b/a87dfc98958263be4fdd4c7aa4924da46b4ad91d83bfb30660dc9de9b33e/ibcp-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8f5afaf0e40e170f2cc1eff2c54157916f6da6356f80119ad555e8224a7c721f",
                "md5": "48d8145c8128d87d96dc8bf80aaec3ce",
                "sha256": "8b23291976f253aff9cffb065befbcad4c9b8909f9283b07bdf807a5e049d847"
            },
            "downloads": -1,
            "filename": "ibcp-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "48d8145c8128d87d96dc8bf80aaec3ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7844,
            "upload_time": "2025-09-01T09:40:21",
            "upload_time_iso_8601": "2025-09-01T09:40:21.193677Z",
            "url": "https://files.pythonhosted.org/packages/8f/5a/faf0e40e170f2cc1eff2c54157916f6da6356f80119ad555e8224a7c721f/ibcp-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-01 09:40:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "matthewmoorcroft",
    "github_project": "ibcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "urllib3",
            "specs": []
        }
    ],
    "lcname": "ibcp"
}
        
Elapsed time: 2.05784s