本项目是一个基于 FastAPI 的应用程序,通过与 Interactive Brokers (IBKR) API 对接,能够便捷地获取投资组合详情,为投资管理提供有力支持。
本项目是一个基于 FastAPI 的应用程序,通过与 Interactive Brokers (IBKR) API 对接,能够便捷地获取投资组合详情,为投资管理提供有力支持。
git clone
cd ibkr-mcp-server
python -m venv venv
source venv/bin/activate # 在 Windows 上使用 `venv\Scripts\activate`
pip install -r requirements.txt
.env 文件,并添加您的 IBKR API 凭证。uvicorn app.main:app --reload
一旦服务器启动,您可以通过访问 API 端点来获取投资组合详情。API 文档将在 http://localhost:8000/docs 可用。
ibkr-mcp-server
├── app
│ ├── __init__.py
│ ├── main.py
│ ├── api
│ │ ├── __init__.py
│ │ └── endpoints
│ │ ├── __init__.py
│ │ └── portfolio.py
│ ├── core
│ │ ├── __init__.py
│ │ └── config.py
│ ├── models
│ │ ├── __init__.py
│ │ └── portfolio.py
│ └── services
│ ├── __init__.py
│ └── ibkr_service.py
├── requirements.txt
├── .env
└── README.md
该项目在 MIT License 下开源。