ibkr-gateway-endpoint
A FastAPI service designed to interface with the Interactive Brokers (IBKR) financial platform API for the purpose of retrieving and managing current client portfolio valuations.
Author

seriallazer
Quick Info
Actions
Tags
IBKR Portfolio Access Gateway
This application is implemented as a modern FastAPI backend service, engineered specifically to communicate with the Interactive Brokers (IBKR) external Application Programming Interface (API) for the purpose of sourcing up-to-the-minute asset holding records.
Component Blueprint
ibkr-gateway-endpoint ├── src │ ├── init.py │ ├── main_server.py │ ├── api_interfaces │ │ ├── init.py │ │ └── asset_endpoints │ │ ├── init.py │ │ └── holdings_routes.py │ ├── core_logic │ │ ├── init.py │ │ └── runtime_config.py │ ├── data_models │ │ ├── init.py │ │ └── account_data_schemas.py │ └── external_services │ ├── init.py │ └── ibkr_connector.py ├── requirements.lock ├── .env_vars └── README.md
Deployment Prerequisites
-
Acquire Source Code: bash git clone
cd ibkr-gateway-endpoint -
Establish Isolated Runtime Environment: bash python3 -m venv venv_ibkr source venv_ibkr/bin/activate # Use
venv_ibkr\Scripts\activateon Windows systems -
Install Required Packages: bash pip install -r requirements.lock
-
Configure Credentials: A configuration file named
.env_varsmust be present in the project root. Populate it with necessary authentication parameters for the IBKR connection. -
Initiate Server Process: bash uvicorn src.main_server:app --reload
Operational Access
Once the service is operational, client applications can query the exposed RESTful interface points to retrieve account holdings. Comprehensive API specification documentation will be accessible via a web browser at http://localhost:8000/docs.
Project Licensing
This software is distributed under the terms of the MIT License.
